Remove player from certains Vehicles ID
#1

Well, I tryed on OnPlayerupdate and OnPlayerEnterVehicle, but I easily failed

I need to player be removed if he enters on certains vehicles id. (More than 127 vehicles id)
Reply
#2

I don't think I quite understand. What do you want again? Please elaborate more on this topic.
Reply
#3

Example: If player enters on Vehicle ID 31, he gets removed.

Thanks.
Reply
#4

Try this.
pawn Код:
if(IsPlayerInVehicle(playerid, 31))
{
  RemovePlayerFromVehicle(playerid);
}
Reply
#5

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        new vehicleid = GetPlayerVehicleID(playerid);
	    new modelid = GetVehicleModel(vehicleid);
		if(newkeys == 2 || newkeys == 3)
		{
			if(vehiclelid == 31)
			{
				RemovePlayerFromVehicle(playerid);
				SendClientMessage(playerid,0xFF9900AA, "This vehicle is not allowed!");
			}
		}
return 1;
}
________
Latina Cam
Reply
#6

Doesn't work... another one?
Reply
#7

do something like thiissss

Код:
forward PrivateCars(carid);

public OnPlayerEnterVehicle(playerid, vehicleid)
{
   if (PrivateCars(vehicleid))
   {
     RemovePlayerFromVehicle(playerid);     
   }
}

public PrivateCars(carid)
{
	if((carid >= 0) && (carid <= 0))
	{
		return 1;
	}
	return 0;
}
its a mini tut for you to use xD
Reply
#8

You should check this part again (it's a big mistake):
Quote:
Originally Posted by [GM
LeGenDy ]
Код:
if((carid >= 0) && (carid <= 0))
Reply
#9

Quote:
Originally Posted by Don Correlli
You should check this part again (it's a big mistake):
Quote:
Originally Posted by [GM
LeGenDy ]
Код:
if((carid >= 0) && (carid <= 0))
pawn Код:
if((carid >= 0) && (carid =< 0))
Solved?
Reply
#10

Quote:
Originally Posted by Fedee!
Solved?
No.

Quote:
Originally Posted by [GM
LeGenDy ]
Код:
if((carid >= 0) && (carid <= 0))
Is it possible for carid to be bigger or equal to 0 AND smaller or equal to 0? No, it's not.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)