Vehicle enter help..
#1

How can i make some cars unenterable like if the
Код:
if(IsOnTutorial[playerid] == 1)
is not assigned, then the player cant enter the vehicle?
Reply
#2

Use one of the following callbacks:
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle
https://sampwiki.blast.hk/wiki/OnPlayerStateChange

Then use the following function in that if statement:
https://sampwiki.blast.hk/wiki/RemovePlayerFromVehicle
Reply
#3

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsOnTutorial[playerid] == 1) ClearAnimations(playerid); //wiil stop the player from entering the vehicle !
}
Reply
#4

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsOnTutorial[playerid] == 1) ClearAnimations(playerid); //wiil stop the player from entering the vehicle !
}
I want it to stop him from entering a specific vehicle lets say i made 3 bikes at airport and i want them locked for any player who is not on tutorial
Reply
#5

put this OnPlayerStateChange

pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
    if(IsOnTutorial[playerid] == 0) RemovePlayerFromVehicle(playerid);
    //other codes
}
if player is not in tutorial he will remove from vehicle.
Reply
#6

I made it and added the id of the bmx that i added in the airport, but when i did it all the bmx's are unenterable..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)