Рекомендованные сообщения



6 posts in this topic

Проблема в том что на пассажирском месте спидометр тоже виден, как это можно исправить?

Share this post


Link to post
Share on other sites

@Andy где вывод спидометра идет? скидывайте код

Share this post


Link to post
Share on other sites
stock ShowPlayerVelocimetro(playerid)
{
    if (PlayerVelocimetro[playerid])
	{
        return true;
    }
    new tacha = GetPlayerVehicleID(playerid);
    if(!IsABoat(tacha) && !IsAPlane(tacha) && GetVehicleModel(tacha) != 509 && GetVehicleModel(tacha) != 481 && GetVehicleModel(tacha) != 510 && !PlayerInRace{playerid})
    PlayerTextDrawSetString(playerid, textPlayerVelocimetro[0][playerid], getVehicleName(GetPlayerVehicleID(playerid)));

    for( new text; text != 5; text++) TextDrawShowForPlayer(playerid, textVelocimetro[text]);
    for( new text; text != 4; text++) PlayerTextDrawShow(playerid, textPlayerVelocimetro[text][playerid]);
    PlayerVelocimetro[playerid] = true ;
    PlayerVelocimetroTimer[playerid] = SetTimerEx("UpdatePlayerVelocimetro", 100, true, "i", playerid);
    return 1;
}

forward UpdatePlayerVelocimetro(playerid);
public UpdatePlayerVelocimetro(playerid) {

    new playervehicle;

    if ( (playervehicle = GetPlayerVehicleID(playerid)) != INVALID_VEHICLE_ID) {

        new string_velo[15];

        format(string_velo, sizeof (string_velo), "%02d Km/h", GetVehicleSpeed(playervehicle));
        PlayerTextDrawSetString(playerid, textPlayerVelocimetro[1][playerid], string_velo);

        format(string_velo, sizeof (string_velo), "%.0f%", GetVehicleHealthEx(playervehicle));
        PlayerTextDrawSetString(playerid, textPlayerVelocimetro[3][playerid], string_velo);

        /*format(string_velo, sizeof (string_velo), "%02d ћњ¦poў", VehInfo[GetPlayerVehicleID(playerid)][vFuel]);
        PlayerTextDrawSetString(playerid, textPlayerVelocimetro[2][playerid], string_velo);*/
    }
    return 1;
}

 

Заметка от DEST , создано

Код берите еще и под спойлер.

Share this post


Link to post
Share on other sites

@Andy Скиньте место где идет вызов ShowPlayerVelocimetro. Т.е.: 

ShowPlayerVelocimetro(); 

Share this post


Link to post
Share on other sites
Спойлер

if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
	{
	    ShowPlayerVelocimetro(playerid);
        else HidePlayerVelocimetro(playerid);
	}
это в OnPlayerStateChange

 

 

Share this post


Link to post
Share on other sites

Замените: 

Спойлер

if(newstate == PLAYER_STATE_DRIVER)
  ShowPlayerVelocimetro(playerid);
else 
  HidePlayerVelocimetro(playerid);

 

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Вадим1234
      By Вадим1234
      CMD:vips(playerid) {     if(GetPVarInt(playerid, "logged") == 0) return 1;     if(player_info[playerid][ADMIN] < 2)        return Send(playerid, COLOR_WHITE, "Команда не обнаружена! Используйте {ffcc00}/menu {FFFFFF}для просмотра команд");     foreach(new i: Player)     {         if(player_info[playerid][VIP] != -1)         {             new fmt_msg[85];             format             (                 fmt_msg, sizeof fmt_msg,                 "%s[%d] (%d DAYS)",                 player_info[NAME],                 i,                 player_info[VIP]             );             Send(playerid, COLOR_YELLOW, fmt_msg);         }     }     return 1; }  
    • Senya Kolymbijskij
      By Senya Kolymbijskij
       
      такие ошибки что делать???
      @mr_sasha087 @DEST Помогите!!
      Это строки  там где  SendClientMessage есть @mr_sasha087 @DEST Помогите!!
      @odosenok