[FilterScript] 0.3e Cuffed system V2
#1

Well this is V3 of the cuffing system

What's new?
If you try to jump while cuffed, you'll fall down on floor
If you try to sprint while cuffed, you'll fall down on floor
*Added in V3* Added cool sound when you get /cuffed, /uncuffed
*Added in V3* Added text when you cuff, uncuff


How does it work? / Commands?
/cuffed = will cuff you and will add cuff object on your hands
/uncuff = will remove cuffs object and will get your hands normal again


Screenie:


Download

V2
http://pastebin.com/yCCkBYk8
http://www.mediafire.com/?9bx340ta7spi86i

V3
http://pastebin.com/Bdb4m4Tw
Reply
#2

C:\Users\Seb\0.3e Server-Script\gamemodes\fgg.pwn(10966) : error 017: undefined symbol "SPECIAL_ACTION_CUFFED"
C:\Users\Seb\0.3e Server-Script\gamemodes\fgg.pwn(10967) : error 017: undefined symbol "SPECIAL_ACTION_CUFFED"
C:\Users\Seb\0.3e Server-Script\gamemodes\fgg.pwn(24889) : error 017: undefined symbol "SPECIAL_ACTION_CUFFED"
Reply
#3

update your includes
in "a_players" you can see this
pawn Code:
#define SPECIAL_ACTION_CUFFED           24
@TOPIC
good work, nice for rp server and a beginner in pawn
Reply
#4

Is there a zCMD + SSCANF version of this?
Reply
#5

I can make ZCMD one?

At the top
Code:
#include <a_samp>
#include <zcmd>
Anywhere
Code:
CMD:cuff(playerid,params[])
{
    SendClientMessage(playerid, 0xFF0000AA, "* You are now cuffed.");
	SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CUFFED);
	SetPlayerAttachedObject(playerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
	return 1;
}
CMD:uncuff(playerid,params[])
{
    SendClientMessage(playerid, 0xFF0000AA, "* You are now uncuffed.");
    for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
    if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
    return 1;
}
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
    if(newkeys & KEY_SPRINT && !(oldkeys & KEY_SPRINT) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
	return 1;
}
I think this should work, didn't test though
Reply
#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
#7

It was actually made to be animation and everyone to use it..
Reply
#8

Ncie for a first
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)