SA-MP Forums Archive
[HELP] it doesn't work - 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)
+--- Thread: [HELP] it doesn't work (/showthread.php?tid=494322)



[HELP] it doesn't work - Luca12 - 12.02.2014

Hello can anyone tell me why this is not working I was give my self leader number 14 and I enter in russian mafia car and it says I have not keyes for that vehicle, you ejected? Thanks


pawn Код:
if(IsARMCar(vehicle))
    {
        if(PlayerInfo[playerid][Leader] == 14 || PlayerInfo[playerid][Member] == 14)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid,GRAD2,"You have not keyes for that vehicle, you ejected.");
        }
    }



Re: [HELP] it doesn't work - CuervO - 12.02.2014

You're checking if the player is a leader or member of 14, and if so, ejecting him from the vehicle. You have the check if the player IS NOT a member of 14 OR it's leader.


Re: [HELP] it doesn't work - Luca12 - 12.02.2014

how can I do that?thanks


Re: [HELP] it doesn't work - PowerPC603 - 12.02.2014

pawn Код:
if(PlayerInfo[playerid][Leader] != 14 || PlayerInfo[playerid][Member] != 14)
!= means "NOT equal".


Re: [HELP] it doesn't work - Luca12 - 12.02.2014

I already try that it doesn't work the message is still the same


Re: [HELP] it doesn't work - CuervO - 12.02.2014

Quote:
Originally Posted by PowerPC603
Посмотреть сообщение
pawn Код:
 
!= means "NOT equal".
should check AND, not for OR

pawn Код:
if(PlayerInfo[playerid][Leader] != 14 && PlayerInfo[playerid][Member] != 14)



Re: [HELP] it doesn't work - Luca12 - 12.02.2014

I check and seems that is fine I give myself leader of rm and I take nrg and nothing it doesn't said that I have not keyes and I was remove myself leader of rm and take nrg and it says that I have not keyes


Thanks man. and ofcorse the others who trying to help me.