OnPlayerStateChange not working at all
#4

Quote:
Originally Posted by Breto
Посмотреть сообщение
Well... I've found that ALL the codes under OnPlayerStateChange doesn't work at all - Tried to find the problem but i failed :S

So.. Here it is..


pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new string[128];
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        new newcar = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(newcar) != 509 && GetVehicleModel(newcar) != 481)  // BMX & Bike
        {
            RadioChoose(playerid, Radio[newcar]);
        }
->      return 1;
    }
    if(oldstate == PLAYER_STATE_DRIVER)
    {
        new model = GetVehicleModel(gLastCar[playerid]);
        if(IsACopCar(gLastCar[playerid]) || model == 457)
        {
            SetPlayerWeapons(playerid);
        }
    }

    [...]
    return 1;
}
Can you spot what's wrong? You're returning 1 before hand, thus the code ends there.
Reply


Messages In This Thread
OnPlayerStateChange not working at all - by -CaRRoT - 27.05.2012, 06:57
Re: OnPlayerStateChange not working at all - by MP2 - 27.05.2012, 08:22
Re: OnPlayerStateChange not working at all - by Black Axe - 27.05.2012, 08:45
Re: OnPlayerStateChange not working at all - by Virtual1ty - 27.05.2012, 08:49
Re: OnPlayerStateChange not working at all - by MP2 - 27.05.2012, 08:49
Re: OnPlayerStateChange not working at all - by -CaRRoT - 27.05.2012, 09:46

Forum Jump:


Users browsing this thread: 2 Guest(s)