09.02.2015, 08:51
Quote:
hi bro this is awsome tutorial for class system n its work for me " +REP " but i have a problem i can fly hunter, hydra, sea sparrow n can drive rhino if i have selected solder class can u help me??
my code Code:
public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicleid = GetPlayerVehicleID(playerid);//variable to get vehicle ids if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive { SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Hunter");//messages goes to the player that he can't drive the hunter RemovePlayerFromVehicle(playerid);//get u off from the hunter } if(GetVehicleModel(vehicleid) == 520 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive { SendClientMessage(playerid, COLOR_DARKGREY, "You Need to be a Pilot to fly Hydra");//messages goes to the player that he can't drive the hydra RemovePlayerFromVehicle(playerid);//get u off from the hydra } if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == PILOT && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is Soldier then he can drive { SendClientMessage(playerid, COLOR_DARKGREY, "You Need to be a Engineer to drive Tank");//messages goes to the player that he can't drive the tank or rhino RemovePlayerFromVehicle(playerid);//get u off from the tank or rhino } if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive { SendClientMessage(playerid, COLOR_DARKGREY, "You Need to be a Pilot to fly Sea Sparrow");//messages goes to the player that he can't drive the tank or sea sparrow RemovePlayerFromVehicle(playerid);//get u off from the sea sparrow } return 1; } |