[HELP]OnPlayerEnterVehicle Not working properly
#1

Well OnPlayerEntervehicle is working but not with my code it is supposed to not let them in the vehicles if there not a donator.For donator rank 1 is supposed to let them in if there a donator lvl 1 but if not it is supposed to not let them enter it but it doesnt work :S
Код:
	if (GetVehicleModel(vehicleid) == 481 && !ispassenger)
		{
		  if(PlayerInfo[playerid][pDonateRank]== 1) 
			 {

				SendClientMessage(playerid,COLOR_LIGHTRED," Warning:You don't have permission to ride this (Need to be a donator)");
				new Float:cx, Float:cy, Float:cz;
				GetPlayerPos(playerid, cx, cy, cz);
				SetPlayerPos(playerid, cx, cy, cz);
			}
	 }
	 if (GetVehicleModel(vehicleid) == 468 || GetVehicleModel(vehicleid)== 541 || GetVehicleModel(vehicleid)== 521 && !ispassenger)
		{
		  if(PlayerInfo[playerid][pDonateRank]== 2)
			 {

				SendClientMessage(playerid,COLOR_LIGHTRED," Warning:You don't have permission to ride this (Need to be a donator Gold Membership)");
				new Float:cx, Float:cy, Float:cz;
				GetPlayerPos(playerid, cx, cy, cz);
				SetPlayerPos(playerid, cx, cy, cz);
			}
	 }
Reply
#2

Sorry for bumping to early but can someone please help me fix this
Reply
#3

Please reply
Reply
#4

I don't think that will do anything. Ineffective script. Because it most likely detects the vehicle when he is in it. And it resets the position back in the vehicle.
Код:
RemovePlayerFromVehicle(i)
Try having it remove the player from the vehicle when he enters it instead.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)