11.09.2012, 13:04
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:
and please be fast as i got less time :/
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;
}