Cuff Command Help ( help for others)
#1

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;
}
Reply


Messages In This Thread
Cuff Command Help ( help for others) - by zT KiNgKoNg - 10.09.2012, 20:32
Re: Cuff Command Help ( help for others) - by ViruZz - 10.09.2012, 20:58
Re: Cuff Command Help ( help for others) - by kbalor - 10.09.2012, 21:01
Re: Cuff Command Help ( help for others) - by zT KiNgKoNg - 10.09.2012, 21:11
Re: Cuff Command Help ( help for others) - by Steven82 - 11.09.2012, 02:56
Re: Cuff Command Help ( help for others) - by [HK]Ryder[AN] - 11.09.2012, 03:04
Re: Cuff Command Help ( help for others) - by zT KiNgKoNg - 11.09.2012, 10:24

Forum Jump:


Users browsing this thread: 1 Guest(s)