If don't have Gun License Jail
#1

I have script like this
pawn Код:
//Ammunation 1
                GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
                SetPlayerInterior(i, 6);
                PlayerInfo[i][pInt] = 6;
                SetPlayerPos(i,264.6288,77.5742,1001.0391);
                PlayerInfo[i][pJailTime] = 300;
                PlayerInfo[i][pJailed] = 1;
Can someone tell me how to do, that will be, that jail only if someone won't have gun license??(pGunLic=0)
Reply
#2

Код:
if(PlayerInfo[playerid][pGunLic] == 0)
{
GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
SetPlayerInterior(i, 6);
PlayerInfo[i][pInt] = 6;
SetPlayerPos(i,264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailTime] = 300;
PlayerInfo[i][pJailed] = 1;
}
else // Code if player have GunLic....
Reply
#3

It doesn't work.... if i do 0 i still spawn in jail
Reply
#4

Thats the whole point of this right... If you dont have a gunlicence you will be jailed, and if you have it you'll continue
Reply
#5

Yes i need this, look
pawn Код:
}
            else if(PlayerToPoint(20, i,292.0274,-36.0291,1001.5156))
            {
                //Ammunation 1
                GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
                SetPlayerInterior(i, 6);
                PlayerInfo[i][pInt] = 6;
                SetPlayerPos(i,264.6288,77.5742,1001.0391);
                PlayerInfo[i][pJailTime] = 300;
                PlayerInfo[i][pJailed] = 1;
I have like this, but when I enter with gun license, im still spawning at jail and have 300 s in, but i want continue..
Reply
#6

Try this:
pawn Код:
else if(PlayerToPoint(20, i,292.0274,-36.0291,1001.5156))
            {
                if(PlayerInfo[playerid][pGunLic] == 0)
                {
                //Ammunation 1
                GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
                SetPlayerInterior(i, 6);
                PlayerInfo[i][pInt] = 6;
                SetPlayerPos(i,264.6288,77.5742,1001.0391);
                PlayerInfo[i][pJailTime] = 300;
                PlayerInfo[i][pJailed] = 1
                }
             }
Reply
#7

okay
Reply
#8

Doesn't work
Reply
#9

Are you sure you have a gun license?
Reply
#10

Yea, but this what you posted to me, i got errors
Reply
#11

Pm me your msn I'll fix it.
Reply
#12

Can someone post me, how to do that ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)