OnPlayerStateChange not working at all!
#1

OnPlayerStateChange not working at all for me .. i tried many things like changing return 0 to return 1 and did stuff like that but it didnt helped..

Yes i will +Rep you

the Code:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{

if(newstate == PLAYER_STATE_DRIVER)
{
SetPlayerArmedWeapon(playerid, 0);
return 0;
}
if ( GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) == 425 && gClass[playerid] == PILOT_CLASS)
{
SendClientMessage(playerid, RED,"ERROR: You need to be Pilot to drive Hunter");
RemovePlayerFromVehicle(playerid);
return 0;
}
if ( GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) == 520 && gClass[playerid] == PILOT_CLASS)
{

SendClientMessage(playerid, RED,"ERROR: You need to be Pilot to drive Hydra");
RemovePlayerFromVehicle(playerid);
return 0;
}
if ( GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) == 432 && gClass[playerid] == ENGINEER_CLASS)
{
SendClientMessage(playerid, RED,"ERROR: You need to be Engineer to drive Rhino");
RemovePlayerFromVehicle(playerid);
return 0;
}

if (GetVehicleModel(GetPlayerVehicleID ( playerid ) ) == 447 && gClass[playerid] == PILOT_CLASS)
{
SendClientMessage(playerid, RED,"ERROR: You need to be Pilot to drive Sea-Sparrow");
RemovePlayerFromVehicle(playerid);
}
return 0;
}
and please be fast as i got less time :/
Reply


Messages In This Thread
OnPlayerStateChange not working at all! - by XtremeR - 11.09.2012, 13:04
Re: OnPlayerStateChange not working at all! - by Kirollos - 11.09.2012, 13:30
Re: OnPlayerStateChange not working at all! - by XtremeR - 11.09.2012, 13:36
Re: OnPlayerStateChange not working at all! - by XtremeR - 11.09.2012, 14:43
Re: OnPlayerStateChange not working at all! - by MarkoN - 11.09.2012, 14:46
Re: OnPlayerStateChange not working at all! - by XtremeR - 11.09.2012, 15:11
Re: OnPlayerStateChange not working at all! - by MarkoN - 11.09.2012, 15:33
Re: OnPlayerStateChange not working at all! - by XtremeR - 11.09.2012, 15:34
Re: OnPlayerStateChange not working at all! - by Biess - 11.09.2012, 15:35
Re: OnPlayerStateChange not working at all! - by park4bmx - 11.09.2012, 15:40

Forum Jump:


Users browsing this thread: 2 Guest(s)