Array must be indexed /cuff cmd
#10

Quote:
Originally Posted by MadeMan
Try this:

pawn Код:
if(!strcmp(cmd,"/cuff",true))
{
cmd=strtok(cmdtext,idx);
giveplayerid=ReturnUser(cmd);
if(gTeam[playerid] == TEAM_POLICE)
{
if(!strlen(cmd)) return SendClientMessage(playerid,GREY,"USAGE: /cuff [playerid]");
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,RED,"ERROR: Invalid player id!");
TogglePlayerControllable(giveplayerid,0);
GameTextForPlayer(giveplayerid, "~y~ Cuffed!",2500,3);
new str[128];
GetPlayerName(playerid, str, sizeof(str));
GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
format(str, sizeof(str), " * %s takes out his cuffs and places it on %s hands. ", str, giveplayername);
ProxDetector(50.0, playerid, str,0x6699FFAA,0x6699FFAA,0x6699FFAA,0x6699FFAA,0x6699FFAA);
return 1;
}
else
{
SendClientMessage(playerid, RED, "ERROR: You're not a police officer!");
}
return true;
}
Woo! It works! Thanks!
Reply


Messages In This Thread
Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 10:09
Re: Array must be indexed /cuff cmd - by M4S7ERMIND - 20.07.2009, 10:12
Re: Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 10:13
Re: Array must be indexed /cuff cmd - by MadeMan - 20.07.2009, 10:30
Re: Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 10:33
Re: Array must be indexed /cuff cmd - by refshal - 20.07.2009, 10:39
Re: Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 10:44
Re: Array must be indexed /cuff cmd - by MadeMan - 20.07.2009, 11:04
Re: Array must be indexed /cuff cmd - by Donny_k - 20.07.2009, 11:11
Re: Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 11:52

Forum Jump:


Users browsing this thread: 1 Guest(s)