if(!strcmp(cmdtext, \"/adminad\", true)){if(pInfo[playerid][Admin] == 0) return SendClientMessage(playerid, Piros, \"Csak Fejlesztok használhatják ezt a parancsot!\");if(pInfo[playerid][Admin] == 5){new tmpspace = strfind(cmdtext, \" \", true, 11);if(!cmdtext[11]) return SendClientMessage(playerid, Zold, \"Használata: /adminad <Játékos ID> <Admin Szint>\");if(!cmdtext[tmpspace+1]) return SendClientMessage(playerid, Zold, \"Használata: /adminad <Játékos ID> <Admin Szint>\");pInfo[strval(cmdtext[11])][Admin]=strval(cmdtext[tmpspace+1]);new tmpstring[128];GetPlayerName(strval(cmdtext[11]), tmpstring, MAX_PLAYER_NAME);format(tmpstring, 128, \"%s-nak/nek adtál %d-as/es Admint.\", tmpstring, strval(cmdtext[tmpspace+1]));SendClientMessage(playerid, Sarga, tmpstring);GetPlayerName(playerid,tmpstring,MAX_PLAYER_NAME);format(tmpstring, 128, \"%s adott neked %d-as/es Aadmint.\", tmpstring, strval(cmdtext[tmpspace+1]));return SendClientMessage(strval(cmdtext[11]), Sarga, tmpstring);}}
gamemode/Stunt.amx]: During execution of OnPlayerCommandText()gamemodes/Stunt.amx]: Run time error 5: \"Invalid memory acces\"
\" post=\"420515\" timestamp=\"1367401874\"]Ragd külön FSbe! [/quote]Lehetõ legrosszab megoldás. Minek rakjon egy szimpla parancsot FS-be?A parancs a public OnPlayerCommandText(playerid, cmdtext) alatt van?
public OnPlayerCommandText(playerid, cmdtext)
if(strcmp(\"/ban\", cmdtext, true) == 0) { new sendername[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] >= 2) { new ok[100]; if(sscanf(params[1], \"us[100]\",giveplayerid, ok)) { SendClientMessage(playerid, COLOR_GRAD2, \"Használat: /ban [név/azonosító] [indok]\"); return 1; } new playerip[18]; GetPlayerIp( giveplayerid,playerip,sizeof(playerip)); format(stringa,sizeof(stringa),\"banip %s\", playerip); SendRconCommand(stringa); SendRconCommand(\"banip\"); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(stringa, sizeof(stringa), \"AdmCmd: %s ki lett tiltva %s által. Ok:%s\", giveplayer,sendername,ok); SendClientMessageToAll(COLOR_RED, stringa); Ban(giveplayerid); printf(\"%s bannolva lett\", giveplayer); } else { SendClientMessage(playerid, COLOR_GRAD1, \"Nem vagy 5ös admin!\"); } return 1; }
error 017: undefined symbol \"params\"warning 215: expression has no effecterror 001: expected token: \";\", but found \"]\"error 029: invalid expression, assumed zerofatal error 107: too many error messages on one line
C:\\Documents and Settings\\k*rv* Jennikee\\Asztal\\AFTERLIFE-NEW\\Afterlife RPG\\Afterlife RPG\\gamemodes\\FCRP.pwn(4671) : warning 209: function \"Streamer_OnPlayerDisconnect\" should return a valuePawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Warning.
return 1;}
}
}=zárásreturn 1;=visszatérés