public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) //test123 { if(playerid == vehicleid) { if(PlayerInfo[playerid][DrivingLicense] == 0) { SendClientMessage(playerid, -1, "You do not have a driving license, you decide to leave the vehicle!"); ClearAnimations(playerid); } } return 1; }
public OnPlayerStateChange(playerid, newstate, oldstate){
if(newstate == PLAYER_STATE_DRIVER){
if(PlayerInfo[playerid][pDrivingLicense] == 0){
SendClientMessage(playerid, -1, "You do not have a driving license, you decide to leave the vehicle!");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) //test123 { if(vehicleid) { if(PlayerInfo[playerid][DrivingLicense] == 0) { SendClientMessage(playerid, -1, "You do not have a driving license, you decide to leave the vehicle!"); ClearAnimations(playerid); } } return 1; }
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) //test123 { if(PlayerInfo[playerid][DrivingLicense] == 0) { SendClientMessage(playerid, -1, "You do not have a driving license, you decide to leave the vehicle!"); ClearAnimations(playerid); } return 1; }
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) //test123
{
if(playerid == vehicleid)
{
if(PlayerInfo[playerid][DrivingLicense] == 0)
{
new Float:POS[3];
GetPlayerPos(playerid, POS[0], POS[1], POS[2]);
SetPlayerPos(playerid, POS[0], POS[1], POS[2]);
SendClientMessage(playerid, -1, "You do not have a driving license, you decide to leave the vehicle!");
return true;
}
}
return 1;
}
Oh, that's good for me too. Thanks . What should I do with this " if(playerid == vehicleid) " ?
|