pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
new Float: Speed;{
Speed = GetSpeed(i);{
switch(GetVehicleModel(GetPlayerVehicleID(playerid))) {
case 481 | 510 | 509: {
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~b~N ~w~D",GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
default: {
if(!OutOfFuel[i])
{
if(Fuel[vehicle] <= 25)
{
if(EngineStatus[vehicle])
{
if(Speed == 0)
{
format(form, sizeof(form), "~w~~n~~n~n~~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~r~Gasolina na reserva~n~~w~Velocidade:~b~ %dKm/ ~n~~w~R ~b~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
else if(IsVehicleDrivingBackwards(vehicle))
{
format(form, sizeof(form), "~w~~n~~n~n~~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~r~Gasolina na reserva~n~~w~Velocidade:~b~ %dKm/h~n~~b~R ~w~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
else if(Speed > 0)
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~r~Gasolina na reserva~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~w~N ~b~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
}
else
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~r~Desligado~n~~w~Gasolina:~b~ %d%~n~~r~Gasolina na reserva~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~b~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
}
else
{
if(EngineStatus[vehicle])
{
if(Speed == 0)
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~b~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
else if(IsVehicleDrivingBackwards(vehicle))
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~w~Velocidade:~b~ %dKm/h ~n~~b~R ~w~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
else if(Speed > 0)
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~w~N ~b~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
}
else
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~r~Desligado~n~~w~Gasolina:~b~ %d%~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~b~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
}
}
}
}
}
return true;
}
assim? se estiver mal,aki esta a "secзгo"
pawn Код:
if(ShowFuel[i] && GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new form[128];
new vehicle = GetPlayerVehicleID(i);
new Float: Speed;
Speed = GetSpeed(i);
if(!OutOfFuel[i])
{
if(Fuel[vehicle] <= 25)
{
if(EngineStatus[vehicle])
{
if(Speed == 0)
{
format(form, sizeof(form), "~w~~n~~n~n~~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~r~Gasolina na reserva~n~~w~Velocidade:~b~ %dKm/ ~n~~w~R ~b~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
else if(IsVehicleDrivingBackwards(vehicle))
{
format(form, sizeof(form), "~w~~n~~n~n~~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~r~Gasolina na reserva~n~~w~Velocidade:~b~ %dKm/h~n~~b~R ~w~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
else if(Speed > 0)
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~r~Gasolina na reserva~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~w~N ~b~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
}
else
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~r~Desligado~n~~w~Gasolina:~b~ %d%~n~~r~Gasolina na reserva~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~b~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
}
else
{
if(EngineStatus[vehicle])
{
if(Speed == 0)
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~b~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
else if(IsVehicleDrivingBackwards(vehicle))
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~w~Velocidade:~b~ %dKm/h ~n~~b~R ~w~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
else if(Speed > 0)
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~b~Ligado~n~~w~Gasolina:~b~ %d%~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~w~N ~b~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
}
else
{
format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~n~~n~~w~Motor:~r~Desligado~n~~w~Gasolina:~b~ %d%~n~~w~Velocidade:~b~ %dKm/h ~n~~w~R ~b~N ~w~D",Fuel[vehicle],GetSpeedKM(i));
GameTextForPlayer(i,form,1000,3);
}
}
}
}
e os ids que eu queria que so apareзe-se a velocidade era 481,510 e 509 :S
Dou ++REP