[Help] Show vehicle model when player enters vehicle.
#5

It's fine with just 1 textdraw, just use TextDrawSetString.

pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER)
    {
        new
            modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
        if (modelid)
        {
            // format a string and pass the modelid as an argument and then use TextDrawSetString to update the string
            TextDrawShowForPlayer(playerid, car0);
        }
    }
    return 1;
}
It's also better to use per-player textdraws for such as things.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)