pawn Код:
CMD:drag(playerid, params[])
{
new id, string[ 128 ];
if( sscanf( params, "u", id) )
{
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /drag [PlayerID/PartOfName]" );
}
else
{
if( PlayerTied[id] >= 1 || PlayerCuffed[id] >= 1)
{
if(GetDistanceBetweenPlayers( playerid, id) < 7)
{
ApplyAnimation(id,"SWEET","Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0,1);
ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0,1);
PlayerInfo[id][BeingDraggedBy] = playerid;
format( string, sizeof( string ), "You have started to drag %s.", PlayerName(id) );
SendClientMessage( playerid, COLOR_LIGHTBLUE, string);
format( string, sizeof( string ), "* %s grabs ahold of %s and starts dragging them.", PlayerName(playerid), PlayerName(id) );
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage( playerid, COLOR_GRAD1, "You're too far away!" );
}
}
else
{
SendClientMessage( playerid, COLOR_GRAD1, "Your target has to be either tied or cuffed." );
}
}
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////
CMD:stopdrag(playerid, params[])
{
#pragma unused params
new string[73];
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if(IsPlayerConnected( i ) && PlayerInfo[i][BeingDraggedBy] == playerid)
{
format( string, sizeof( string ), "You have stopped dragging %s.", PlayerName(playerid) );
SendClientMessage( playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has stopped dragging %s.", PlayerName(playerid), PlayerName(i) );
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[i][BeingDraggedBy] = -1;
ClearAnimations(playerid);
}
}
return 1;
}
Can you make it and post it for me please ? i dont know how to make it.
i have another question ,can anyone make the /drag command for LEO`s only ? so the Civillians cant use /drag