SA-MP Forums Archive
Pawn Crash - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pawn Crash (/showthread.php?tid=258703)



Pawn Crash - bernardo - 01.06.2011

Hey,

i've been made this parte of code for my GM
Код:
	else if(PRESSED(KEY_SUBMISSION))
	{
	    if(IsPlayerInAnyVehicle(playerid))
		{
			if(IsPlayerConnected(playerid))
			{
				if(GetPlayerState(playerid) != 2) return 0;
				new vid = GetPlayerVehicleID(playerid);
				new plname[MAX_PLAYER_NAME];
				GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
				if(lights != 1)
				{
					SetVehicleParamsEx(vid,engine,1,alarm,doors,bonnet,boot,objective);
					SendClientMessage(playerid, COLOR_WHITE, "Ligas-te as Luzes!");
	            }
                else
                {
			        SetVehicleParamsEx(vid,engine,0,alarm,doors,bonnet,boot,objective);
			        SendClientMessage(playerid, COLOR_WHITE, "Desligas-te as Luzes!");
	            }
	            return 1;
		    }
		}
	}
When i try to compile, Pawn Crash.

Did you see anything wrong? :O