SA-MP Forums Archive
Examen - 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: Examen (/showthread.php?tid=140016)



Examen - Asasi - 07.04.2010

I and these two scripts and I do not know where to put them to work:
Код:
    if(PlayerInfo[i][pExamen] == 1)
	{
		if(GetPlayerState(i) != PLAYER_STATE_DRIVER)
	    {
	     PlayerInfo[i][pExamen] = 0;
	     SendClientMessage(i,COLOR_LIGHTGREEN, "Ai cazut Testul deoarece ai iesit din Masina!");
         SetVehicleToRespawn(268);
		 DisablePlayerCheckpoint(i);
	     }
	}
	 if(PlayerInfo[i][pExamen] == 1)
	{
	new carinfo = GetPlayerVehicleID(i);
	new Float:health;
    GetVehicleHealth(carinfo, health);
        if(health < 1000.0)
       {
        PlayerInfo[i][pExamen] = 0;
	    SendClientMessage(i,COLOR_LIGHTGREEN, "Ai cazut Testul deoarece ai zgariat Masina!");
	    DisablePlayerCheckpoint(i);
	    RemovePlayerFromVehicle(i);
	    SetVehicleToRespawn(268);
	    }
	}
One is if you hit the car crash driving exam, and the second is when you get out of the car crash you exam exam!
But I do not know where to put them to work ...
??


Re: Examen - RyDeR` - 07.04.2010

1. Use
Код:
GetVehicleHealth(vehicleid, &Float:health);
2.
Код:
if(GetPlayerState == PLAYER_STATE_DRIVER) 
{ 
    // ur code 
}
else
{
    // You left the vehicle
}



Re: Examen - Asasi - 07.04.2010

Sorry ... but precisely where they make?