[FilterScript] 0.3e Cuffed system V2
#6

sscanf version to use this on targets :

pawn Code:
CMD:cuff(playerid,params[])
{
    new targetid, reason;
    if(!sscanf(params, "us[40]", targetid, reason))
    {
        SendClientMessage(targetid, 0xFF0000AA, "* You are now cuffed.");
        SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED);
        SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
        SendClientMessage(playerid, 0xFF0000, "Target cuffed");
    }
    else return SendClientMessage(playerid, 0xFF0000AA, "[ERROR]Usage: /cuff [ID] [REASON] ");
    return 1;
}
CMD:uncuff(playerid,params[])
{
    new targetid;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] /uncuff [ID] ");
    for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        if(IsPlayerAttachedObjectSlotUsed(targetid, i))
        {
            SendClientMessage(targetid, 0xF0000AA, "UNCUFFED! ");
            SetPlayerSpecialAction(targetid, SPECIAL_ACTION_NONE);
            RemovePlayerAttachedObject(playerid, i);
        }
        else return 0;
    }
    return 1;
}

Though it's buggy. Unreal. I'll make a more accurate one if I have more time.

@Loc, Use IsPlayerInRangeOfPoint(targetid, playerX,playerY,playerZ); to make it RP style.

++++ Use a goddamn variable to avoid problems.
Reply


Messages In This Thread
[UPDATED] 0.3e Cuffed system, with object *V3* - by LocMax - 09.08.2012, 08:40
Re: 0.3e Cuffed system V2 - by [TC]XxJuggaloxX - 09.08.2012, 09:46
Re: 0.3e Cuffed system V2 - by DartakousLien - 09.08.2012, 09:48
Re: 0.3e Cuffed system V2 - by Syntax - 09.08.2012, 12:39
Re: 0.3e Cuffed system V2 - by LocMax - 09.08.2012, 12:43
Re: 0.3e Cuffed system V2 - by Gangs_Rocks - 09.08.2012, 13:27
Re: 0.3e Cuffed system V2 - by LocMax - 09.08.2012, 13:29
Re: 0.3e Cuffed system V2 - by Ben_Gale - 09.08.2012, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)