Lil help! +rep
#1

i tried to make remove player from vehicle

i have 6 classes

Код:
new vehicleid = GetPlayerVehicleID(playerid);//variable to get vehicle ids
    if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == MECHANIC && gPlayerClass[playerid] == MEDIC)
    {
    SendClientMessage(playerid, COLOR_RED, "You Need to  be an Agent Or Special Agent to fly Hunter");
    RemovePlayerFromVehicle(playerid);
    }
    if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == MECHANIC && gPlayerClass[playerid] == MEDIC)
	{
	SendClientMessage(playerid, COLOR_RED, "You Need to  be an Agent Or Special Agent to fly Sea Sparrow");
    RemovePlayerFromVehicle(playerid);
    }
    if(GetVehicleModel(vehicleid) == 520 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == MECHANIC && gPlayerClass[playerid] == MEDIC)
    {
    SendClientMessage(playerid, COLOR_RED, "You Need to  be an Agent Or Special Agent to fly Hydra");
    RemovePlayerFromVehicle(playerid);
    }
    if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == AGENT)
    {
    SendClientMessage(playerid, COLOR_RED, "You Need to  be an Mechanic Or Medic Or Special Agent to fly Hydra");
    RemovePlayerFromVehicle(playerid);
    }
for certain vehicle remove how can i make it please my code is not working when i am in server but it compiles fine

can some-one help?
Reply
#2

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);//variable to get vehicle ids
    if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == MECHANIC && gPlayerClass[playerid] == MEDIC)
    {
        SendClientMessage(playerid, COLOR_RED, "You Need to  be an Agent Or Special Agent to fly Hunter");
        RemovePlayerFromVehicle(playerid);
    }
Just a quick example, add it under OnPlayerStateChange and add
pawn Код:
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(vehicleid)...
Reply
#3

i guess u took that from my tut, watch it carefully you will make it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)