need a lil help
#1

i need help on OnPlayerStateChange

i made it like this :

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid;
if(newstate == PLAYER_STATE_DRIVER)
{
SetPlayerArmedWeapon(playerid, 0);
}
if(GetVehicleModel(vehicleid) == 425 && gClass[playerid] != PILOT_CLASS && gClass[playerid] != DONOR_CLASS)
{
SendClientMessage(playerid, RED,"ERROR: You need to be Pilot/Donor to drive Hunter");
RemovePlayerFromVehicle(playerid);
}

if(GetVehicleModel(vehicleid) == 520 && gClass[playerid] != PILOT_CLASS  && gClass[playerid] != DONOR_CLASS)
{

SendClientMessage(playerid, RED,"ERROR: You need to be Pilot/Donor to drive Hydra");
RemovePlayerFromVehicle(playerid);
}
if(GetVehicleModel(vehicleid) == 432 && gClass[playerid] != ENGINEER_CLASS  && gClass[playerid] != DONOR_CLASS)

{
SendClientMessage(playerid, RED,"ERROR: You need to be Engineer/Donor to drive Rhino");
RemovePlayerFromVehicle(playerid);
}

if(GetVehicleModel(vehicleid) == 447 && gClass[playerid] != PILOT_CLASS  && gClass[playerid] != DONOR_CLASS)

{
SendClientMessage(playerid, RED,"ERROR: You need to be Pilot/Donor to drive Sea-Sparrow");
RemovePlayerFromVehicle(playerid);
    }
    return 1;
}
pawno is also not giving error or warning but when i go in game to test it doesnt works
Reply


Messages In This Thread
need a lil help - by XtremeR - 08.09.2012, 08:46
Re: need a lil help - by Smokkr - 08.09.2012, 08:59
Re: need a lil help - by StrangeLove - 08.09.2012, 09:01
Re: need a lil help - by leonardo1434 - 08.09.2012, 09:01
Re: need a lil help - by XtremeR - 08.09.2012, 09:45
Re: need a lil help - by XtremeR - 08.09.2012, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)