[Help]/drag command Hotkey
#1

Hey guys ,i`m making a new server and i have a problem with /drag command ,i cant add the Fire Hotkey to stop dragging the suspect if anyone knows how to do it ,Post it please
PHP код:
CMD:drag(playeridparams[])
{
if(
IsACop(playerid))
{
new 
string[128], giveplayerid;
if(
sscanf(params"u"giveplayerid)) return SendClientMessageEx(playeridCOLOR_GREY"USAGE: /drag [playerid]");
if(
IsPlayerConnected(giveplayerid))
{
if(
GetPVarInt(giveplayerid"PlayerCuffed") == 2)
{
if(
IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playeridCOLOR_WHITE" You must be out of the vehicle to use this command.");
if(
GetPVarInt(giveplayerid"BeingDragged") == 1)
{
SendClientMessageEx(playeridCOLOR_WHITE" That player is already being dragged. ");
return 
1;
}
new 
Float:dXFloat:dYFloat:dZ;
GetPlayerPos(giveplayeriddXdYdZ);
if(!
IsPlayerInRangeOfPoint(playerid5.0dXdYdZ))
{
SendClientMessageEx(playeridCOLOR_GRAD2" That suspect is not near you.");
return 
1;
}
format(stringsizeof(string), "* %s has is now dragging you."GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayeridCOLOR_WHITEstring);
format(stringsizeof(string), "* You are now dragging %s, you may move them now."GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playeridCOLOR_WHITEstring);
format(stringsizeof(string), "* %s grabs ahold of %s and begins to move them."GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessageEx(playeridCOLOR_WHITE"You are now dragging the suspect, press the '{AA3333}FIRE{FFFFFF}' button to stop.");
SetPVarInt(giveplayerid"BeingDragged"1);
SetPVarInt(playerid"DraggingPlayer"giveplayerid);
}
else
{
SendClientMessageEx(playeridCOLOR_WHITE" The specified player is not cuffed !");
}
}
}
else
{
SendClientMessageEx(playeridCOLOR_GREY" You are not a LEO ! ");
return 
1;
}
return 
0;

Reply


Messages In This Thread
[Help]/drag command Hotkey - by Drago987 - 09.09.2013, 14:05
Re: [Help]/drag command Hotkey - by Mattakil - 09.09.2013, 14:13
Re: [Help]/drag command Hotkey - by Drago987 - 09.09.2013, 14:24
Re: [Help]/drag command Hotkey - by Drago987 - 10.09.2013, 12:38

Forum Jump:


Users browsing this thread: 2 Guest(s)