13.03.2010, 17:43
This is my /makecop
It makes playerid 0 a cop, no matter what i write ![confused](images/smilies/confused.gif)
How do I fix this?
pawn Код:
if(strcmp(cmdtext, "/makecop", true) == 0)
{
new tmp[128];
new idx;
new giveplayerid;
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /makecop [playerid]");
}
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
CopMake(giveplayerid);
SendClientMessage(giveplayerid, COLOR_BLUE, "You have been made a police officer. Changes will appear on next death.");
}
}
}
return 1;
}
![confused](images/smilies/confused.gif)
How do I fix this?