[FilterScript] (un)cuff By For Cops and Robbers - by mgd
#1

(un)cuff By For Cops and Robbers - by mgd
What is that fs ?
This fs can let you /cuff and /uncuff when someone is ticket in Cops & Robbers Server
pawn Код:
//made by mgd
#include <a_samp>
#include <zcmd>
#include <sscanf2>
CMD:cuff(playerid, params[])
{
    new targetid;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "[USAGE]: /cuff [Part of Name/Player ID]");
    if(IsPlayerConnected(targetid))
        {
            new Float:x, Float:y, Float:z;
               GetPlayerPos(playerid, x, y, z);
               if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
                   {
                    new str[512];
                      new name[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    new target[MAX_PLAYER_NAME];
                       GetPlayerName(targetid, target, sizeof(target));
                       format(str, sizeof(str), "INFO: You have cuffed %s!",target);
                       SendClientMessage(playerid, 0xE01B1B, str);
                       format(str, sizeof(str), "WARNING: You have been cuffed by %s!",name);
                       SendClientMessage(targetid, 0xE01B1B, str);
                    SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000);
                      SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED);
                      return 1;
                }

        }
    return 1;
}

CMD:uncuff(playerid, params[])
{

        new targetid;
        if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "[USAGE]: /uncuff [Part of Name/Player ID]");
        if(IsPlayerConnected(targetid))
        {
            new Float:x, Float:y, Float:z;
               GetPlayerPos(playerid, x, y, z);
               if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
                   {
                    if(!SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000))return SendClientMessage(playerid,-1,"ERROR: The player is not cuffed!");//this will check that if the player is not cuffed and you are trying to apply this cmd,this will send him a error message.
                      SetPlayerSpecialAction(targetid,SPECIAL_ACTION_NONE);
                    new str[512];
                      new name[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    new target[MAX_PLAYER_NAME];
                       GetPlayerName(targetid, target, sizeof(target));
                       format(str, sizeof(str), "INFO: You have uncuffed %s!",target);
                       SendClientMessage(playerid, 0xE01B1B, str);
                       format(str, sizeof(str), "WARNING: You have been uncuffed by %s!",name);
                       SendClientMessage(targetid, 0xE01B1B, str);/
                      return 1;
                }

        }
        return 1;
}
Credits :
mgd
PasteBin Link
Download link
cuff_uncuff by mgd
download the includes from here http://www.mediafire.com/?9adkercp8dkbl94
Reply
#2

You have some errors. First is to change <#include <sscanf> to #include <sscanf2> , and second is in the end of 54th line
pawn Код:
SendClientMessage(targetid, 0xE01B1B, str);/
there is one slash ( / ) which need to be removed
pawn Код:
SendClientMessage(targetid, 0xE01B1B, str);
Reply
#3

nice .. hope to see more from you!
Reply
#4

Quote:
Originally Posted by Anak
Посмотреть сообщение
nice .. hope to see more from you!
Thanks bro
Reply
#5

Can the players still move when cuffed? Because I don't see anything of Freeze or TogglePlayerControllable
Reply
#6

Quote:
Originally Posted by Da_Noob
Посмотреть сообщение
Can the players still move when cuffed? Because I don't see anything of Freeze or TogglePlayerControllable
If you don't see it, then no.
Reply
#7

Yup they can move while cuff but can't drive cars.
Reply
#8

I watch your script and, I think you simply paste the tutorials of TaLhA XIV or simply at the thread @https://sampforum.blast.hk/showthread.php?pid=2077109#pid2077109

pawn Код:
// And I think you simply remove the comments from him?
// And where is the credits of the creators of this scripts?
And I think it's usefull for some guys who have a cops and robbers server
Reply
#9

Good Job
Reply
#10

Nice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)