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



restricted vehicles - Lirbo - 20.05.2014

how can i do it? there are code for few faggios
i want to do only levels 1-3 can enter... to get level in my script is: DOF2_GetInt(pFile(playerid),"Level")


Re: restricted vehicles - MacT - 20.05.2014

Maybe try more specific and tell us more, what vehicles, where vehicles will be located etc... In GamodeInit you need CreateVehicle and to top need add variable like: admincars. When try learn to use OnPlayerStateChange function.


Re : restricted vehicles - mirou123 - 20.05.2014

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(GetVehicleModel(vehicleid) == 462 && DOF2_GetInt(pFile(playerid),"Level") > 3)
 	{
		SendClientMessage(playerid, -1, "This vehicle is for players below level 4!");
    	RemovePlayerFromVehicle(playerid);
		new Float:slx, Float:sly, Float:slz;
		GetPlayerPos(playerid, slx, sly, slz);
		SetPlayerPos(playerid, slx, sly, slz);
     	return 1;
	}
}



Re: restricted vehicles - Lirbo - 21.05.2014

Quote:
Originally Posted by MacT
Посмотреть сообщение
Maybe try more specific and tell us more, what vehicles, where vehicles will be located etc... In GamodeInit you need CreateVehicle and to top need add variable like: admincars. When try learn to use OnPlayerStateChange function.
on PlayerKeyStateChange...

if vehicleid == NoobVehicle and player level >3 RemovePlayerFromVehicle

please help me