SA-MP Forums Archive
Bug with faction cars - 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: Bug with faction cars (/showthread.php?tid=400569)



Bug with faction cars - FL3GM4 - 19.12.2012

i make it in OnPlayerStateChange but it wont to remove me from car if im not GSF Faction

Код:
	if(newstate == 1)
    {
        new CarCheck = GetPlayerVehicleID(playerid);
   		if(CarCheck == GSF[0] || CarCheck == GSF[1] || CarCheck == GSF[2] || CarCheck == GSF[3] || CarCheck == GSF[4] || CarCheck == GSF[5] || CarCheck == GSF[6]  || CarCheck == GSF[7]  || CarCheck == GSF[8]  || CarCheck == GSF[9]  || CarCheck == GSF[10] || CarCheck == GSF[11]  || CarCheck == GSF[12] || CarCheck == GSF[13] || CarCheck == GSF[14]  )
        {
            if(PlayerInfo[playerid][Clan] != 1 || PlayerInfo[playerid][Lider] != 1)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "You Don't have the keys for this car.");
            }
        }
        return 1;
    }



Re: Bug with faction cars - Roel - 19.12.2012

newstate == 1) means if he is on foot, replace the 1 with PLAYER_STATE_DRIVER
And be sure that all those variables are right.


Re: Bug with faction cars - FL3GM4 - 19.12.2012

okej, but now its getting me out from the car and if I'm in faction of faction car

edit: resolved!