Ask about OnPlayerUpdate !
#4

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
    {
        SetPlayerArmedWeapon(playerid, 0);
    }
You could put this in OnPlayerEnterVehicle or the OnPlayerStateChange ; once you are in a vehicle you can't switch weapons. So it doesn't re-check all the time which isn't needed (as far as I know!)

Also, why are you checking if the player is connected?
Quote:
Originally Posted by SAMP Wiki
This callback is called everytime a client/player updates the server with their status.
So a disconnected player is not calling the callback (off course).

Futher I don't see what'd be wrong. And I wouldn't use a timer to check this. Why use a timer when there's OnPlayerUpdate? (@Onfroi)

- Kwarde

p.s.
Wrong section . This should be in the scripting help section.
Reply


Messages In This Thread
Ask about OnPlayerUpdate ! - by VenomMancer - 27.02.2014, 01:32
Re: Ask about OnPlayerUpdate ! - by ikey07 - 27.02.2014, 01:56
Re: Ask about OnPlayerUpdate ! - by Onfroi - 27.02.2014, 02:10
Re: Ask about OnPlayerUpdate ! - by Kwarde - 27.02.2014, 04:18
Re: Ask about OnPlayerUpdate ! - by VenomMancer - 27.02.2014, 11:13
Re: Ask about OnPlayerUpdate ! - by Pottus - 27.02.2014, 11:43
Re: Ask about OnPlayerUpdate ! - by Jefff - 27.02.2014, 12:41
Re: Ask about OnPlayerUpdate ! - by Djole1337 - 27.02.2014, 12:48
Re: Ask about OnPlayerUpdate ! - by VenomMancer - 27.02.2014, 13:42

Forum Jump:


Users browsing this thread: 1 Guest(s)