SA-MP Forums Archive
Need a Uncuff of this: - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need a Uncuff of this: (/showthread.php?tid=245293)



Need a Uncuff of this: - kickflipdude - 30.03.2011

Hi, i recently added the /cuff command to my server

pawn Код:
COMMAND:cuff(playerid, params[])
{
    new pID, targetname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
    if(GetPlayerSkin(playerid) == 280 && 281) // Both IDs are police officer
    {
        GetPlayerName(pID, targetname, sizeof(targetname));
        GetPlayerName(playerid, name, sizeof(name));
        if (isnull(params)) return SendClientMessage(playerid, -1, "Usage: /cuff <playerid>");
        format(string, sizeof(string), "You have been cuff by Police Officer %s", name);
        format(string,sizeof(string), "You have cuff player %s", targetname);
        SendClientMessage(pID, -1, string);
        SendClientMessage(playerid, -1, string);
        TogglePlayerControllable(pID, 0); // Freezes the player. Isn't /cuff in RP, a cmd to freeze?

    } else return SendClientMessage(playerid, -1, "You need to have a police skin !");
    return 1;
}
Can someone please make me a /uncuff? i cant find a exactly one of this


Re: Need a Uncuff of this: - antonio112 - 30.03.2011

It`s easy... just TogglePlayerControllable(pID, 1); ... This will uncuff him, ain`t that hard. You can do it yourself.


Re: Need a Uncuff of this: - KaleOtter - 30.03.2011

pawn Код:
COMMAND:uncuff(playerid, params[])
{
    new pID, targetname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
    if(GetPlayerSkin(playerid) == 280 && 281) // Both IDs are police officer
    {
        GetPlayerName(pID, targetname, sizeof(targetname));
        GetPlayerName(playerid, name, sizeof(name));
        if (isnull(params)) return SendClientMessage(playerid, -1, "Usage: /uncuff <playerid>");
        format(string, sizeof(string), "You have been uncuffed by Police Officer %s", name);
        format(string,sizeof(string), "You have been uncuffed by player %s", targetname);
        SendClientMessage(pID, -1, string);
        SendClientMessage(playerid, -1, string);
        TogglePlayerControllable(pID, 1);

    } else return SendClientMessage(playerid, -1, "You need to have a police skin !");
    return 1;
}
Something like this?


Re: Need a Uncuff of this: - kickflipdude - 30.03.2011

TYVM Kale. appreciate you.