20.12.2009, 00:17
I want my /cuff Command to say to the person who uses the command, that they have cuffed the player
for example, when a cop uses /cuff 2 it already tells ID 2 that they have been cuffed, but i want it to sendclientmessage to the cop who uses that command that player id 2 has been cuffed.
If someone could show me how to do that, it would be nice. Thanks
for example, when a cop uses /cuff 2 it already tells ID 2 that they have been cuffed, but i want it to sendclientmessage to the cop who uses that command that player id 2 has been cuffed.
If someone could show me how to do that, it would be nice. Thanks
Код:
if(!strcmp(cmd,"/cuff",true)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { tmp=strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /cuff playerid"); giveplayerid = ReturnUser(tmp); if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,COLOR_GREY,"Invalid player id."); TogglePlayerControllable(giveplayerid,0); GameTextForPlayer(giveplayerid, "~y~ You have been Cuffed!",2500,3); } return true; } if(!strcmp(cmd,"/uncuff",true)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { tmp=strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /uncuff playerid"); giveplayerid = ReturnUser(tmp); if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,COLOR_GREY,"Invalid player id."); TogglePlayerControllable(giveplayerid,1); GameTextForPlayer(giveplayerid, "~y~ You have been Uncuffed!",2500,3); } return true; }