19.12.2009, 18:07
Hi, I have a cuff and uncuff command, it works but instead of cuffing the player ID it only cuffs the person who uses the command.
Im new the scripting so if you know how to fix it, it would be benificial to help explain to my why it went wrong.
Thanks
here is the script
Im new the scripting so if you know how to fix it, it would be benificial to help explain to my why it went wrong.
Thanks
here is the script
Код:
if(!strcmp(cmd,"/cuff",true)) if(gTeam[playerid] == 2 || IsACop(playerid)) { cmd=strtok(cmdtext,idx); if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /cuff playerid"); giveplayerid = ReturnUser(tmp); if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,COLOR_GREY,"Invalid player id."); TogglePlayerControllable(playerid,0); GameTextForPlayer(playerid, "~y~ You have been Cuffed!",2500,3); return true; } if(!strcmp(cmd,"/uncuff",true)) if(gTeam[playerid] == 2 || IsACop(playerid)) { cmd=strtok(cmdtext,idx); if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /uncuff playerid"); giveplayerid = ReturnUser(tmp); if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,COLOR_GREY,"Invalid player id."); TogglePlayerControllable(playerid,1); GameTextForPlayer(playerid, "~y~ You have been Uncuffed!",2500,3); return true; }