Can some correct this for me?
#1

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (IsPlayerInAnyVehicle(playerid))
    {
        if (Engine[vehicleid] == 0)
        TogglePlayerControllable(playerid, 0);
        GameTextForPlayer(playerid, "Please type ~r~/eon~r~ to turn the Vehicles Engine on", 4, 3000);
    }
    return 1;
}
When I enter the a vehicle it does not freeze me or send the game text?
Reply
#2

Quote:
Originally Posted by -Luis
Посмотреть сообщение
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (IsPlayerInAnyVehicle(playerid))
    {
        if (Engine[vehicleid] == 0)
        TogglePlayerControllable(playerid, 0);
        GameTextForPlayer(playerid, "Please type ~r~/eon~r~ to turn the Vehicles Engine on", 3000, 4);
    }
    return 1;
}
When I enter the a vehicle it does not freeze me or send the game text?
dont use OnPlayerEnterVehicle

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER  && oldstate == PLAYER_STATE_ONFOOT)
    {
        if (Engine[vehicleid] == 0)
        {
            TogglePlayerControllable(playerid, 0);
            GameTextForPlayer(playerid, "Please type ~r~/eon~r~ to turn the Vehicles Engine on", 4, 3000);
        }
        else if(Engine[vehicleid] == 1) return SendClientMessage(playerid,color,"The engine is on you can drive");
        }
    }
    return 1;
}
By the way, on GameTextForPlayer you inverse the numbers, 3000 is the time, not the style.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)