How to make to player can enter in checkpoint only if he is in veh id 411 ? -
bustern - 29.08.2013
How to do that ?And i want if tha player is in another veh or on foot, server send message"You arent in your car, you cant enter"
Re: How to make to player can enter in checkpoint only if he is in veh id 411 ? -
DanishHaq - 29.08.2013
Use
https://sampwiki.blast.hk/wiki/IsPlayerInAnyVehicle, this will check if the player is in a vehicle, and if so, then you can use this to check his vehicle ID:
https://sampwiki.blast.hk/wiki/GetPlayerVehicleID. You can use them both to check if the player is in a vehicle ID of 411, as you wanted in the title.
Re: How to make to player can enter in checkpoint only if he is in veh id 411 ? -
bustern - 29.08.2013
And how to server send him a message "you are not in veh id 411"And how to server block my command if the player isnt in that veh ?
Re: How to make to player can enter in checkpoint only if he is in veh id 411 ? -
PrinceKumar - 29.08.2013
If you create code for player if he is in vehicle id 411 then he will able to use it, then u don't need to block it cause it will not allow players to use ur function if he isn't in vehicle id 411 as a error you can use SendClientMessage(playerid, color, "your error message here");
Re: How to make to player can enter in checkpoint only if he is in veh id 411 ? -
Lynchos - 30.08.2013
Код:
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)
{
if(ArrivedAtCheckPoint[playerid] == 1)
{
//SCRIPT YOUR SHIT
}
else return SendClientMessage(playerid, color, "You are not at the Checkpoint yet");
}
else return SendClientMessage(playerid, color, "This is not the right vehicle to enter the checkpoint");
}
Re: How to make to player can enter in checkpoint only if he is in veh id 411 ? -
xganyx - 30.08.2013
Ex: Your name bustern
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 411)
{
new pname[50];
if(GetPlayerName(playerid,pname,sizeof(pname) == strval("bustern")))
{
SendClientMessage(playerid,-1,"Welcome to Infernus");
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,-1,"You't don't have access to use this vehicle");
}
}
return 1;
}
Re: How to make to player can enter in checkpoint only if he is in veh id 411 ? -
bustern - 30.08.2013
Quote:
Originally Posted by Lynchos
Код:
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)
{
if(ArrivedAtCheckPoint[playerid] == 1)
{
//SCRIPT YOUR SHIT
}
else return SendClientMessage(playerid, color, "You are not at the Checkpoint yet");
}
else return SendClientMessage(playerid, color, "This is not the right vehicle to enter the checkpoint");
}
|
doesnt work
Re: How to make to player can enter in checkpoint only if he is in veh id 411 ? -
bustern - 30.08.2013
Nevermind, i scrripted it