10.09.2012, 20:32
hey guys iv just started making my servers cuffing command so far its small but there is a few errors like in the cuffing message but im fixing that and ill update it by the end of this week but here it is
WARNING THE CJ SKIN WILL NOT APPLY ANIMATIONS
Code update as far as i know it now shows the other players name but i dont know since i have't tested it with another person since i can't with no one to test it with me
WARNING THE CJ SKIN WILL NOT APPLY ANIMATIONS
Code update as far as i know it now shows the other players name but i dont know since i have't tested it with another person since i can't with no one to test it with me
pawn Код:
CMD:cuff(playerid, params[]) //using ZCMD this is how your command will start off looking like.
{
if (PlayerInfo[playerid][pFaction] >=0){
new pname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME],otherplayerid,message[500];
if(sscanf(params,"u", otherplayerid))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /cuff [id]");
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerName(otherplayerid, name, sizeof(name));
SetPlayerAttachedObject(otherplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
SetPlayerSpecialAction(otherplayerid,SPECIAL_ACTION_CUFFED);
format(message, sizeof(message), "%s Has Hand Cuffed Suspect [%s]",pname,name);
ProxDetector(50.0, playerid, message, -1);
}
else{
SendClientMessage(playerid,-1,"Sorry Your Not Part Of The Sherrifs Department");
}
return 1;
}
CMD:uncuff(playerid, params[]) //using ZCMD this is how your command will start off looking like.
{
if (PlayerInfo[playerid][pFaction] >=0){
new pname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME],otherplayerid,message[500];
if(sscanf(params,"u", otherplayerid))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /uncuff [id]");
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerName(otherplayerid, name, sizeof(name));
RemovePlayerAttachedObject(otherplayerid, 0);
SetPlayerSpecialAction(otherplayerid,SPECIAL_ACTION_NONE);
format(message, sizeof(message), "%s Has Removed The Hand Cuffs From [%s]",pname,name);
ProxDetector(50.0, playerid, message, -1);
}
else{
SendClientMessage(playerid,-1,"Sorry Your Not Part Of The Sherrifs Department");
}
return 1;
}