25.08.2011, 17:13
Hello today i started make a new gamemode and i got error when i make /makeadmin In Estonian "/mддraadminniks".
I got error. undefined symbol "ReturnUser".
I got error. undefined symbol "ReturnUser".
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new idx, teine;
new cmd[256];
new tmp[256];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/mддraadmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, HELESININE, "KASUTUS: {FFFFFF}/mддraadmin [Mдngijaid/Osanimest] [level]");
return 1;
}
tmp = strtok(cmdtext, idx);
new level;
teine = ReturnUser(tmp);
level = strval(tmp);
if (KasutajaInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(teine))
{
if(teine != INVALID_PLAYER_ID)
{
GetPlayerName(teine, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
KasutajaInfo[teine][pAdmin] = level;
format(string, sizeof(string), "Sa edutasid mдngija %s level %d Administraatoriks.",giveplayer, level);
SendClientMessage(playerid, HALL, string);
format(string, sizeof(string), "Admninistraator %s edutas su level %d administraatoriks.", sendername, level);
SendClientMessage(teine, HALL, string);
}
}
}
else
{
SendClientMessage(playerid, HALL, "Sul pole piisavalt хigusi!");
}
}
return 1;
}