ERRORS!
#10

I didn't find "GetPlayerClass" function on sa-mp wiki, I assume that you have this function in your gamemode, however try this code:

pawn Code:
CMD:cuff(playerid, params[])
{
    if(GetPlayerClass(playerid) == COP_CLASS)
    {
        if(GetPlayerWantedLevel(playerid) >= 3)) return SendClientMessage(playerid, -1, "You can't cuff that player");
        {
            SetPlayerSpecialAction(playerid,24);
            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:arrest(playerid, params[])
{
    if(GetPlayerClass(playerid) == COP_CLASS)
    {
        if(GetPlayerWantedLevel(playerid) >= 3)) return SendClientMessage(playerid, -1, "Player isn't wanted!");
        {
            SetPlayerInterior(id, 3);//sets player interior
            SetPlayerVirtualWorld(playerid, 10);//sets player vw
            SetPlayerFacingAngle(playerid, 360.0);//player angle
            SetPlayerPos(id, 197.5662, 175.4800, 1004.0);//player pos
            SetPlayerHealth(id, 9999999999.0);//player cannot be killed
            ResetPlayerWeapons(playerid);//resets his weapons
            JailTimer[playerid] = 60000;
            SetPlayerWantedLevel(playerid, 0);
        }
    }
    return 1;
}
if GetPlayerClass isn't a function in your gamemode, just save the number of the class of the player in a variable.

I hope I helped any feedback is appreciated!
Reply


Messages In This Thread
ERRORS! - by TheKnown - 17.09.2015, 13:03
AW: ERRORS! - by Kaliber - 17.09.2015, 13:10
Re: ERRORS! - by TheKnown - 17.09.2015, 13:11
AW: ERRORS! - by Kaliber - 17.09.2015, 13:13
Re: ERRORS! - by TheKnown - 17.09.2015, 13:16
AW: ERRORS! - by Kaliber - 17.09.2015, 13:17
Re: ERRORS! - by TheKnown - 17.09.2015, 13:18
Re: ERRORS! - by TheKnown - 17.09.2015, 13:29
Re: ERRORS! - by TheKnown - 17.09.2015, 13:48
Re: ERRORS! - by Stanford - 17.09.2015, 13:51

Forum Jump:


Users browsing this thread: 1 Guest(s)