24.09.2010, 23:20
ok here:
pawn Код:
COMMAND:cuff(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
new id,pskin = GetPlayerSkin(playerid),Float:x, Float:y, Float:z;
if(pskin == 265 || pskin == 266 || pskin == 267 || pskin == 280 || pskin == 281 || pskin == 284 || pskin == 285 || pskin == 286 || pskin == 287 || pskin == 288)
if(sscanf(params, "u",id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /cuff [id]");
if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if(GetPlayerSkin(playerid))return SendClientMessage(playerid,0xFF0000FF,"ERROR: You dont have permisson to access this command.");
GetPlayerPos(id,x,y,z);
if(!IsPlayerInRangeOfPoint(id, 3, x, y, z))return SendClientMessage(playerid, 0xFF0000FF, "**You are not close enough to that player to cuff him.");
else if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot ues this while in a vehicle.");
else if(TogglePlayerControllable(id,0))return SendClientMessage(id,0x8080FFFF,"**You have been restrained in handcuffs.");
Cuff[id] = 1;
{
GetPlayerPos(id,x,y,z);
}
return 1;
}

