What's wrong with this?
#1

Hello guys, i have made a code, but it's not working i don't know why, every citizen can drive the LSPD car, it's not working in any faction, i have like 12 factions and it's not working, any citizen can drive faction cars.

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    SendClientMessage(playerid, COLOR_BLUE, "Remember to wear your seatbelt so you don't get fined!(/belt).");
Under OnPlayerEnterVehicle

Код:
else if(IsLeoVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 1)
	    {
		    new Float:pos[3];
		    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
		    SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
		    SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the LSPD.");
Reply
#2

You missed RemovePlayerFromVehicle(playerid);
Reply
#3

Quote:
Originally Posted by xerox8521
Посмотреть сообщение
You missed RemovePlayerFromVehicle(playerid);
Like this?

Код:
else if(IsLeoVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 1)
	    {
		    new Float:pos[3];
                    RemovePlayerFromVehicle(playerid);
		    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
		    SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
		    SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the LSPD.");
Reply
#4

Still not working. Any help?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)