28.05.2009, 19:24
How can i do if a player isn't level 2 he couldn't enter car id 451 A.k.a turismo?
enum Level { Lygis // this is level Patirtis... and so on }
new pLevel[MAX_PLAYERS][Level];
new Float:px, Float:py, Float:pz;
GetPlayerPos(playerid,px,py,pz);
if(TheWayYouGetThePlayerLevelGoesHere < 2) return SetPlayerPos(playerid,px,py,pz);
return 1;
//OnPlayerEnterVehicle
if(GetVehicleModel(vehicleid) == 451)
{
if(pLevel[playerid][Level] < 2) RemovePlayerFromVehicle(playerid)
}
pLevel[playerid][Level] < 2)
if(GetPlayerVehicleID(playerid) == 451) { if(pLevel[playerid] == 2) { return 1; } else SendClientMessage(playerid, COLOR_WHITE, "You have been removed from the vehicle, you need to be level 2." RemovePlayerFromVehicle(playerid); }