OnPlayerStateChange Thing.
#4

Quote:
Originally Posted by austin070
Посмотреть сообщение
pawn Код:
OnPlayerEnterVehicle(..)
{
     SendClientMessage(playerid, color, "Type /eon to turn on the vehicle's engine!");
     return 1;
}
Make sure you change "color" to one of your colors.
OnPlayerEnterVehicle will get called when the player is close enough from a vehicle and presses enter.

You can use OnPlayerStateChange to let the player know what to do when he is IN the vehicle.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if ((newstate == PLAYER_STATE_DRIVER) && (oldstate == PLAYER_STATE_ONFOOT))
    {
        SendClientMessage(playerid, -1, "Type /eon to turn on the vehicle's engine!");
    }

    return 1;
}
Reply


Messages In This Thread
OnPlayerStateChange Thing. - by iGetty - 17.04.2011, 07:16
Re: OnPlayerStateChange Thing. - by austin070 - 17.04.2011, 07:29
Re: OnPlayerStateChange Thing. - by iGetty - 17.04.2011, 07:35
Re: OnPlayerStateChange Thing. - by [NoV]LaZ - 17.04.2011, 07:35
Re: OnPlayerStateChange Thing. - by Kwarde - 17.04.2011, 07:36
Re: OnPlayerStateChange Thing. - by iGetty - 17.04.2011, 07:44
Re: OnPlayerStateChange Thing. - by Kwarde - 17.04.2011, 07:46
Re: OnPlayerStateChange Thing. - by iGetty - 17.04.2011, 07:47
Re: OnPlayerStateChange Thing. - by Stigg - 17.04.2011, 08:07
Re: OnPlayerStateChange Thing. - by iGetty - 17.04.2011, 08:11

Forum Jump:


Users browsing this thread: 2 Guest(s)