Command doesn't work
#6

Oh come on ! No1 can help me ?! I tried this too... This is my command now :
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new cmd[256];
new string[128];
new tmp[256];
new idx;



if(strcmp(cmd, "/makeadmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, Crvena, "KORISTENJE: /makeadmin [playerid/DioImena] [level(1-3)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if (PlayerInfo[playerid][AdminLvl] >= 1337 || IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][AdminLvl] = level;
format(string, sizeof(string), "Postavljen si za admina level %d od %s", level, sendername);
SendClientMessage(para1, Crvena, string);
format(string, sizeof(string), "Postavio si %s na admin level %d.", giveplayer,level);
SendClientMessage(playerid, Crvena, string);
}
}
}
else
{
SendClientMessage(playerid, Crvena, "[ERROR]: Samo administratori mogu koristiti ovu komandu.");
}
}
return 1;
}
return 0;
}

I go ingame, everything's normal, but when I type in /makeadmin, nothing happends !
Reply


Messages In This Thread
HELP pls ! Command problem. - by .sparkY - 16.11.2010, 09:50
Re: Command doesn't work - by Dj_maryo1993 - 16.11.2010, 10:17
Re: Command doesn't work - by .sparkY - 16.11.2010, 10:47
Re: Command doesn't work - by iggy1 - 16.11.2010, 10:57
Re: Command doesn't work - by .sparkY - 16.11.2010, 11:20
Re: Command doesn't work - by .sparkY - 16.11.2010, 11:59
Re: Command doesn't work - by .sparkY - 16.11.2010, 19:00
Re: Command doesn't work - by Kidemo - 16.11.2010, 19:03
Re: Command doesn't work - by .sparkY - 16.11.2010, 19:37
Re: Command doesn't work - by .sparkY - 17.11.2010, 14:14

Forum Jump:


Users browsing this thread: 1 Guest(s)