SA-MP Forums Archive
IsPlayerJailed - 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: IsPlayerJailed (/showthread.php?tid=133600)



IsPlayerJailed - Andy_McKinley - 13.03.2010

I tried but failed. How can I disable teleport commands when a player is jailed.
Muted players ARE allowed to use teleport commands.
I tried this one, could someone help me with this one and I will do the rest of my TP commands.

pawn Код:
//baseball
    if(strcmp(cmdtext, "/baseball", true) == 0)
    {
     SetPlayerHealth(playerid, 2.0);
     SetPlayerArmour(playerid, 0.0);
     ResetPlayerWeapons(playerid);
     GivePlayerWeapon(playerid, 5, 1);
     SetPlayerPos(playerid, 1384.0188,2185.7866,11.0234);
     SetPlayerInterior(playerid, 0);
     SetPlayerVirtualWorld(playerid, 0);
     return 1;
    }



Re: IsPlayerJailed - Razvann - 13.03.2010

pawn Код:
if(strcmp(cmdtext, "/baseball", true) == 0)
    {
        if(PlayerInfo[playerid][pJailed] == 0) // or your code here
        {
        SetPlayerHealth(playerid, 2.0);
            SetPlayerArmour(playerid, 0.0);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid, 5, 1);
            SetPlayerPos(playerid, 1384.0188,2185.7866,11.0234);
            SetPlayerInterior(playerid, 0);
            SetPlayerVirtualWorld(playerid, 0);
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR, "You can't teleport which you are jailed!");
        }
        return 1;
    }