Cuff Command Help ( help for others) -
zT KiNgKoNg - 10.09.2012
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
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;
}
Re: Cuff Command Help ( help for others) -
ViruZz - 10.09.2012
So what's the problem your having?
Re: Cuff Command Help ( help for others) -
kbalor - 10.09.2012
So you want to test us if its working or not, but first you need 2 Players, right? Let me try.
Re: Cuff Command Help ( help for others) -
zT KiNgKoNg - 10.09.2012
yes thanks also feel free the share it
Re: Cuff Command Help ( help for others) -
Steven82 - 11.09.2012
Quote:
Originally Posted by Ultra-Gaming
yes thanks also feel free the share it
|
Why didn't you just post this in the snippet thread?
Re: Cuff Command Help ( help for others) -
[HK]Ryder[AN] - 11.09.2012
I suggest you to check if the player is near the other player or anyone can cuff anyone no matter how far he is..
Re: Cuff Command Help ( help for others) -
zT KiNgKoNg - 11.09.2012
im doing that mate iv been busy im going to put Invalid id ect in-range