Bug with faction cars
#1

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;
    }
Reply
#2

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

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

edit: resolved!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)