Beiträge von xTheMeniacx

    ocmd:godmode(playerid,params[])
    {
    switch(GetPVarInt(playerid, "GodMode"))
    {
    case 0:
    {
    if(sscanf(params,"us[128]"))return SCM(playerid,COLOR_GRAU,"Info: /God");
    if(GetPVarInt(playerid,"Adminlevel") <1)return SCM(playerid,COLOR_GRAU,"Du bist nicht befugt diesen Befehl zu nutzen!");
    SetPlayerHealth(playerid, FLOAT_INFINITY);
    SendClientMessage(playerid, COLOR_ROT, "GodMode aktiviert. Nutze ihn nicht aus!");
    SetPVarInt(playerid, "GodMode", 1);
    printf("%i",GetPVarInt(playerid, "GodMode"));
    }
    case 1:
    {
    SetPlayerHealth(playerid,100.0);
    SendClientMessage(playerid, COLOR_ROT, "GodMode deaktiviert.");
    SetPVarInt(playerid, "GodMode", 0);
    printf("%i",GetPVarInt(playerid, "GodMode"));
    }
    }
    return 1;
    }


    Fehler


    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(264) : error 029: invalid expression, assumed zero
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(264) : error 035: argument type mismatch (argument 2)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.

    Guten abend
    Ich habe gerade versucht ein OOC chat zu erstellen aber irgentwie können das nur Admins.


    Code
    ocmd@2:o,ooc(playerid,params[])
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 0)return SCM(playerid,COLOR_GRAU,"Du bist nicht Eingeloggt.");
    if(GetPVarInt(playerid,"Adminlevel") <0)return SCM(playerid,COLOR_GRAU,"Du bist nicht befugt diesen Befehl zu nutzen!");
    new string[128],text[128];
    if(sscanf(params,"s[128]",text))return SCM(playerid,COLOR_GRAU,"Info: /o oder /OOC [text]");
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && GetPVarInt(i,"Adminlevel") >0)
    {
    format(string,128,"[OOC]: %s: %s",SpielerName(i),text);
    SCM(i,COLOR_WEIß,string);
    }
    return 1;
    }
    return 1;
    }



    und wieso sieht man die Fehler Meldung nicht Oo

    Guten Tag!
    Da ich eben versucht habe mit OCMD ein Godmode für Admins zu erstellen und es nicht klappte frage ich euch.
    Es wehre sehr nett wenn ihr mir den Kompletten befehl schicken könntet.
    Danke schon mal

    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(86) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(87) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(89) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(90) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(91) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(95) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(96) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(97) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(98) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(101) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(102) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(103) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(104) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(106) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(112) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(113) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(115) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(120) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(121) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(131) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(132) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(135) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(136) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(139) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(140) : error 017: undefined symbol "SCM"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(146) : error 017: undefined symbol "SpielerName"


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    26 Errors.

    [pwn=22]main()
    {
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
    }


    public OnGameModeInit()
    {
    // Don't use these lines if it's a filterscript
    SetGameModeText("GRP");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    return 1;
    }[/pwn]


    92


    [pwn=92]ocmd:makeadmin(playerid,params[])
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 0)return SCM(playerid,COLOR_GRAU,"Du bist nicht Eingeloggt.");
    if(!IsPlayerAdmin(playerid))return SCM(playerid,COLOR_GRAU,"Melde dich bitte als RCON-Admin an.");
    new pID,alevel,string[128];
    if(sscanf(params,"ui",pID,alevel))return SCM(playerid,COLOR_GRAU,"Info: /makeadmin [playerid/name] [adminlevel(0-8)]");
    if(!IsPlayerConnected(pID))return SCM(playerid,COLOR_GRAU,"Info: Der angegebene Spieler ist zurzeit nicht Online.");
    if(alevel <0 || alevel >8)return SCM(playerid,COLOR_GRAU,"Bitte wähle ein Adminlevel zwischen 0-8");
    if(alevel == 0)
    {
    SetPVarInt(playerid,"Adminlevel",0);
    format(string,128,"Admin %s hat dir deine Adminrechte komplett entzogen. Adminlevel: %d",SpielerName(playerid),alevel);
    SCM(pID,COLOR_BLAU,string);
    format(string,128,"Du hast %s die Adminrechte entzogen. (Adminlevel: %d)",SpielerName(pID),alevel);
    SCM(playerid,COLOR_BLAU,string);
    return 1;
    }
    format(string,128,"Admin %s hat dir das Adminlevel %d vergeben.",SpielerName(playerid),alevel);
    SCM(pID,COLOR_BLAU,string);
    format(string,128,"Du hast %s das Adminlevel %d gegeben.",SpielerName(pID),alevel);
    SCM(pID,COLOR_BLAU,string);
    SetPVarInt(playerid,"Adminlevel",alevel);
    printf("Admin: %s | pID: %s | Adminlevel vergeben: %d",SpielerName(playerid),SpielerName(pID),alevel);
    return 1;
    }[/pwn]

    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(22) : error 001: expected token: ";", but found "-identifier-"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(92) : error 012: invalid function call, not a valid address
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(92) : warning 215: expression has no effect
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(92) : warning 215: expression has no effect
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(92) : warning 215: expression has no effect
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(92) : warning 215: expression has no effect
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(92) : error 001: expected token: ";", but found ")"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(92) : error 029: invalid expression, assumed zero
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(92) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    5 Errors.

    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(28) : error 026: no matching "#if..."
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(93) : error 017: undefined symbol "sscanf"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(99) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(101) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(105) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(107) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(110) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(119) : error 017: undefined symbol "sscanf"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(124) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(139) : error 017: undefined symbol "sscanf"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(143) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(150) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(164) : error 017: undefined symbol "sscanf"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(166) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(179) : error 017: undefined symbol "sscanf"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(181) : error 017: undefined symbol "SpielerName"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(196) : error 017: undefined symbol "sscanf"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    17 Errors.

    // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT



    #include <a_samp>
    #if Gamemode
    #include <ocmd>


    //Defines
    //Farben
    #define COLOR_GRAU 0xA0A0A0FF
    #define COLOR_BLAU 0x00A5FFFF
    #define COLOR_ROT 0xFF0041FF


    #define ACC_SAVED "Accounts"
    #define SCM SendClientMessage
    #define SCMToAll SendClientMessageToAll



    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    ///OCMD
    //MakeAdmin
    ocmd:makeadmin(playerid,params[])
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 0)return SCM(playerid,COLOR_GRAU,"Du bist nicht Eingeloggt.");
    if(!IsPlayerAdmin(playerid))return SCM(playerid,COLOR_GRAU,"Melde dich bitte als RCON-Admin an.");
    new pID,alevel,string[128];
    if(sscanf(params,"ui",pID,alevel))return SCM(playerid,COLOR_GRAU,"Info: /makeadmin [playerid/name] [adminlevel(0-8)]");
    if(!IsPlayerConnected(pID))return SCM(playerid,COLOR_GRAU,"Info: Der angegebene Spieler ist zurzeit nicht Online.");
    if(alevel <0 || alevel >8)return SCM(playerid,COLOR_GRAU,"Bitte wähle ein Adminlevel zwischen 0-8");
    if(alevel == 0)
    {
    SetPVarInt(playerid,"Adminlevel",0);
    format(string,128,"Admin %s hat dir deine Adminrechte komplett entzogen. Adminlevel: %d",SpielerName(playerid),alevel);
    SCM(pID,COLOR_BLAU,string);
    format(string,128,"Du hast %s die Adminrechte entzogen. (Adminlevel: %d)",SpielerName(pID),alevel);
    SCM(playerid,COLOR_BLAU,string);
    return 1;
    }
    format(string,128,"Admin %s hat dir das Adminlevel %d vergeben.",SpielerName(playerid),alevel);
    SCM(pID,COLOR_BLAU,string);
    format(string,128,"Du hast %s das Adminlevel %d gegeben.",SpielerName(pID),alevel);
    SCM(pID,COLOR_BLAU,string);
    SetPVarInt(playerid,"Adminlevel",alevel);
    printf("Admin: %s | pID: %s | Adminlevel vergeben: %d",SpielerName(playerid),SpielerName(pID),alevel);
    return 1;
    }

    Guten Abend
    Ich bekomme irgentwie ein fehler wenn ich OCMD Befehle erstelle.


    Fehler:
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(7) : error 017: undefined symbol "Gamemode"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(74) : warning 219: local variable "text" shadows a variable at a preceding level
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(107) : error 010: invalid function or declaration
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(109) : error 010: invalid function or declaration
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(110) : error 010: invalid function or declaration
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(112) : error 010: invalid function or declaration
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(113) : error 010: invalid function or declaration
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(115) : error 010: invalid function or declaration
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(119) : error 054: unmatched closing brace ("}")
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(120) : error 010: invalid function or declaration
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(122) : error 010: invalid function or declaration
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(366) : warning 203: symbol is never used: "ban"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(366) : warning 203: symbol is never used: "dveh"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(366) : warning 203: symbol is never used: "freeze"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(366) : warning 203: symbol is never used: "kick"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(366) : warning 203: symbol is never used: "makeadmin"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(366) : warning 203: symbol is never used: "string"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(366) : warning 203: symbol is never used: "text"
    C:\Users\-.-\Desktop\Gamemodes\GamemodeXBigBossX.pwn(366) : warning 203: symbol is never used: "veh"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    [pwn=107]ocmd@2:ac,adminchat(playerid,params[])
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 0)return SCM(playerid,COLOR_GRAU,"Du bist nicht Eingeloggt.");
    if(GetPVarInt(playerid,"Adminlevel") <1)return SCM(playerid,COLOR_GRAU,"Du bist nicht befugt diesen Befehl zu nutzen!");
    new string[128],text[128];
    if(sscanf(params,"s[128]",text))return SCM(playerid,COLOR_GRAU,"Info: /ac oder /adminchat [text]");
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && GetPVarInt(i,"Adminlevel") >0)
    {
    format(string,128,"[Adminchat]: %s: %s",SpielerName(i),text);
    SCM(i,COLOR_BLAU,string);
    }
    return 1;
    }
    return 1;
    }[/pwn]

    C:\Users\-.-\Desktop\RegisterLogin.pwn(21) : error 026: no matching "#if..."
    C:\Users\-.-\Desktop\RegisterLogin.pwn(31) : error 026: no matching "#if..."
    C:\Users\-.-\Desktop\RegisterLogin.pwn(62) : error 017: undefined symbol "DIALOG_LOGIN"
    C:\Users\-.-\Desktop\RegisterLogin.pwn(243) : error 017: undefined symbol "DIALOG_LOGIN"
    C:\Users\-.-\Desktop\RegisterLogin.pwn(247) : error 017: undefined symbol "ROT"
    C:\Users\-.-\Desktop\RegisterLogin.pwn(255) : error 017: undefined symbol "ROT"
    C:\Users\-.-\Desktop\RegisterLogin.pwn(256) : error 017: undefined symbol "DIALOG_LOGIN"
    C:\Users\-.-\Desktop\RegisterLogin.pwn(266) : warning 217: loose indentation
    C:\Users\-.-\Desktop\RegisterLogin.pwn(270) : error 017: undefined symbol "ROT"
    C:\Users\-.-\Desktop\RegisterLogin.pwn(278) : error 017: undefined symbol "GR"
    C:\Users\-.-\Desktop\RegisterLogin.pwn(278) : error 029: invalid expression, assumed zero
    C:\Users\-.-\Desktop\RegisterLogin.pwn(278) : error 017: undefined symbol "N"
    C:\Users\-.-\Desktop\RegisterLogin.pwn(278) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    12 Errors.