Cuff Tell Cop
#1

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

Код:
	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;
	}
Reply
#2

Use format string thingies..like..

pawn Код:
new string[64];
            format(string, sizeof(string), "You Cuffed/Uncuffed %s.", cuffedplayer);
            SendClientMessage(playerid, COLOR_WHITE, string);
Somthing like that.. of course not exactly but you get idea.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)