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



Не найдено.

27 posts in this topic

Не показывается одометр :) Мод плюс рп, вот все что относится к переменной одометра

new PlayerText:SpeedometrOdometr[MAX_PLAYERS];

И

PlayerTextDrawHide(playerid, SpeedometrOdometr[playerid]);

везде прописано а одометр все равно не показывается

Share this post


Link to post
Share on other sites
PlayerTextDrawShow(playerid, SpeedometrOdometr[playerid]);

 

Share this post


Link to post
Share on other sites

@MuhammadPawn Тоже имеется

Share this post


Link to post
Share on other sites

@Daniil Roslyakov  все что вообще есть от спидометра одометра:

Из switch(GetPVarInt(playerid,"gPlayerSpeed"))

PlayerTextDrawHide(playerid, SpeedometrOdometr[playerid]);
PlayerTextDrawShow(playerid, SpeedometrOdometr[playerid]);
PlayerTextDrawSetString(playerid, SpeedometrOdometr[playerid], otext);
    SpeedometrOdometr[playerid] = CreatePlayerTextDraw(playerid, 520.000000, 385.280059, "000000");
	PlayerTextDrawLetterSize(playerid, SpeedometrOdometr[playerid], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, SpeedometrOdometr[playerid], 1);
	PlayerTextDrawColor(playerid, SpeedometrOdometr[playerid], -1);
	PlayerTextDrawSetShadow(playerid, SpeedometrOdometr[playerid], 0);
	PlayerTextDrawSetOutline(playerid, SpeedometrOdometr[playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, SpeedometrOdometr[playerid], 51);
	PlayerTextDrawFont(playerid, SpeedometrOdometr[playerid], 3);
	PlayerTextDrawSetProportional(playerid, SpeedometrOdometr[playerid], 1);

stock ShowSpeedometr(playerid)

PlayerTextDrawShow(playerid, SpeedometrOdometr[playerid]);
PlayerTextDrawHide(playerid, SpeedometrOdometr[playerid]);

 

Edited by Remmi_Feed

Share this post


Link to post
Share on other sites

весь stock ShowSpeedometr(playerid) скинь

Share this post


Link to post
Share on other sites

@MuhammadPawn 

Спойлер

stock ShowSpeedometr(playerid)
{
	new carid = GetPlayerVehicleID(playerid);
    if(!IsABMX(carid)) SetPVarInt(playerid,"open_speed",1);
    PLAYER_DATA[playerid][data_SPEED_UPDATE] = SetTimerEx("SpeedUpdate", 200, true, "d", playerid);
    if(GetPVarInt(playerid, "gPlayerSpeed") == 1) return true;
    for(new i = 0; i < 10; i++) TextDrawShowForPlayer(playerid, SpeedometrFon[i]);
	PlayerTextDrawShow(playerid, SpeedometrSpeed[playerid]);
	PlayerTextDrawShow(playerid, SpeedometrEngine[playerid]);
	PlayerTextDrawShow(playerid, SpeedometrLock[playerid]);
	PlayerTextDrawShow(playerid, SpeedometrLamp[playerid]);
	PlayerTextDrawShow(playerid, SpeedometrOdometr[playerid]);
	PlayerTextDrawShow(playerid, SpeedometrFuel[playerid]);
	return true;
}

 

 

Share this post


Link to post
Share on other sites

@Remmi_Feed ну тут нету причины почему он не показывается (возможно ты его скрываешь гдето)

Share this post


Link to post
Share on other sites

@MuhammadPawn ну я скинул все места где он используется. Больше нету

Share this post


Link to post
Share on other sites
5 часов назад, Remmi_Feed сказал:

PlayerTextDrawHide(playerid, SpeedometrOdometr[playerid]);

Где это используется?

Share this post


Link to post
Share on other sites

@stibs здесь 

Спойлер

 


case 1:
			    	{
			    	    switch(GetPVarInt(playerid,"gPlayerLogo"))
					    {
					    	case 0:
							{
							    //for(new i = 0; i < 4; i++) TextDrawHideForPlayer(playerid, LOGO[i]);
								SetPVarInt(playerid,"gPlayerLogo",1);
							}
					    	case 1:
					    	{
					    	    //r(new i = 0; i < 4; i++) TextDrawShowForPlayer(playerid, LOGO[i]);
								SetPVarInt(playerid,"gPlayerLogo",0);
							}
					    }
			    	}
				    case 2:
			    	{
			    	    switch(GetPVarInt(playerid,"gPlayerSpeed"))
					    {
					    	case 0:
							{
							    SetPVarInt(playerid,"gPlayerSpeed",1);
							    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
								{
									new carid = GetPlayerVehicleID(playerid);
									if(!IsABMX(carid))
									{
									    for(new i = 0; i < 10; i++) TextDrawHideForPlayer(playerid, SpeedometrFon[i]);
										PlayerTextDrawHide(playerid, SpeedometrSpeed[playerid]);
										PlayerTextDrawHide(playerid, SpeedometrEngine[playerid]);
										PlayerTextDrawHide(playerid, SpeedometrLock[playerid]);
										PlayerTextDrawHide(playerid, SpeedometrLamp[playerid]);
										PlayerTextDrawHide(playerid, SpeedometrOdometr[playerid]);
										PlayerTextDrawHide(playerid, SpeedometrFuel[playerid]);
									}
								}
							}

и 

Спойлер

 


stock HideSpeedometr(playerid)
{
    DeletePVar(playerid,"open_speed");
    KillTimer(PLAYER_DATA[playerid][data_SPEED_UPDATE]);
    for(new i = 0; i < 10; i++) TextDrawHideForPlayer(playerid, SpeedometrFon[i]);
	PlayerTextDrawHide(playerid, SpeedometrSpeed[playerid]);
	PlayerTextDrawHide(playerid, SpeedometrEngine[playerid]);
	PlayerTextDrawHide(playerid, SpeedometrLock[playerid]);
	PlayerTextDrawHide(playerid, SpeedometrLamp[playerid]);
	PlayerTextDrawHide(playerid, SpeedometrOdometr[playerid]);
	PlayerTextDrawHide(playerid, SpeedometrFuel[playerid]);
}

 

Edited by Remmi_Feed

Share this post


Link to post
Share on other sites

@stibs public OnPlayerDeath(playerid, killerid, reason)

if(GetPVarInt(playerid,"open_speed") == 1) HideSpeedometr(playerid);

public OnPlayerStateChange(playerid, newstate, oldstate)

if(oldstate == 2 && newstate == 1) // вылазит
    {
        if(PLAYER_DATA[playerid][data_CT_VEH] != INVALID_VEHICLE_ID)
        {
            GetPlayerPos(playerid,oldposX[playerid],oldposY[playerid],oldposZ[playerid]);
            
            DisablePlayerRaceCheckpoint(playerid);
	        DestroyVehicle(PLAYER_DATA[playerid][data_CT_VEH]);
			PLAYER_DATA[playerid][data_CT_VEH] = INVALID_VEHICLE_ID;
			PLAYER_DATA[playerid][data_CT_NUMBER] = 0;
			SetPlayerPosAC(playerid, -1503.6699,1609.8861,36.5690);
		}
	
	
	
  		if(!IsABMX(carid)) HideSpeedometr(playerid),SetPlayerDrunkLevel (playerid, 0);
    }

Edited by Remmi_Feed

Share this post


Link to post
Share on other sites

@stibs

stock IsABMX(carid)
{
	new model = GetVehicleModel(carid);
	if(model == 481 || model == 510 || model == 509 || model == 462 || model == 484 || model == 454) return true;
	return false;
}

Да, есть спидометр на байке

Share this post


Link to post
Share on other sites

@Remmi_Feed попробуйте сесть в велосипед с ид 481, как советовали раннее

Share this post


Link to post
Share on other sites

@DEST спидометр появился

Share this post


Link to post
Share on other sites
5 часов назад, Remmi_Feed сказал:

@stibs public OnPlayerDeath(playerid, killerid, reason)


if(GetPVarInt(playerid,"open_speed") == 1) HideSpeedometr(playerid);

public OnPlayerStateChange(playerid, newstate, oldstate)


if(oldstate == 2 && newstate == 1) // вылазит
    {
        if(PLAYER_DATA[playerid][data_CT_VEH] != INVALID_VEHICLE_ID)
        {
            GetPlayerPos(playerid,oldposX[playerid],oldposY[playerid],oldposZ[playerid]);
            
            DisablePlayerRaceCheckpoint(playerid);
	        DestroyVehicle(PLAYER_DATA[playerid][data_CT_VEH]);
			PLAYER_DATA[playerid][data_CT_VEH] = INVALID_VEHICLE_ID;
			PLAYER_DATA[playerid][data_CT_NUMBER] = 0;
			SetPlayerPosAC(playerid, -1503.6699,1609.8861,36.5690);
		}
	
	
	
  		if(!IsABMX(carid)) HideSpeedometr(playerid),SetPlayerDrunkLevel (playerid, 0);
    }

В этом втором коде перед IsABMX восклицательный знак уберите

Share this post


Link to post
Share on other sites

@DEST ничего не произошло, пробега как нет так и не было 

Share this post


Link to post
Share on other sites

@stibs пробег

Share this post


Link to post
Share on other sites

кинь код обновления спидометрпа UpdateSpeedometr или как-то так

Share this post


Link to post
Share on other sites

@stibs нашел 

public SpeedUpdate(playerid)
{
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new carid = GetPlayerVehicleID(playerid);

        if(GetPlayerDistanceFromPoint(playerid, CAR_DATA[carid][data_PosX], CAR_DATA[carid][data_PosY], CAR_DATA[carid][data_PosZ]) > 300.0)
		{
		    CAR_DATA[carid][data_ODOM]++;
		    GetPlayerPos(playerid, CAR_DATA[carid][data_PosX], CAR_DATA[carid][data_PosY], CAR_DATA[carid][data_PosZ]);
		}
		
		if(PLAYER_DATA[playerid][data_CT_NUMBER] != 0) RepairVehicle(carid);
		
		
		
		new stext[4], otext[8],ftext[10],IItext[24];
		format(stext, sizeof(stext),"%.0f", Player_Speed(playerid)*1.5);
		PlayerTextDrawSetString(playerid,SpeedometrSpeed[playerid],stext);
        format(ftext, sizeof(ftext),"%d", CAR_DATA[carid][data_FUEL]);
        PlayerTextDrawSetString(playerid,SpeedometrFuel[playerid],ftext);
        switch(Player_Speed(playerid))
    	{
    	    case 0: format(IItext, sizeof(IItext),"");
    	    case 1..5: format(IItext, sizeof(IItext),"~g~i");
    	    case 6..10: format(IItext, sizeof(IItext),"~g~ii");
    	    case 11..15: format(IItext, sizeof(IItext),"~g~ii");
    	    case 16..20: format(IItext, sizeof(IItext),"~g~iii");
    	    case 21..25: format(IItext, sizeof(IItext),"~g~iiii");
    	    case 26..30: format(IItext, sizeof(IItext),"~g~iiiii");
    	    case 31..35: format(IItext, sizeof(IItext),"~g~iiiiii");
    	    case 36..40: format(IItext, sizeof(IItext),"~g~iiiiiii");
    	    case 41..45: format(IItext, sizeof(IItext),"~g~iiiiiiii");
    	    case 46..50: format(IItext, sizeof(IItext),"~g~iiiiiiiii");
    	    case 51..55: format(IItext, sizeof(IItext),"~g~iiiiiiiiii");
    	    case 56..60: format(IItext, sizeof(IItext),"~y~iiiiiiiiiii");
    	    case 61..65: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiii");
    	    case 66..70: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiiii");
    	    case 71..75: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiiiii");
    	    case 76..80: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiiiiii");
    	    case 81..85: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiiiiiii");
    	    case 86..90: format(IItext, sizeof(IItext),"~r~iiiiiiiiiiiiiiiii");
    	    case 91..95: format(IItext, sizeof(IItext),"~r~iiiiiiiiiiiiiiiiii");
    	    case 96..100: format(IItext, sizeof(IItext),"~r~iiiiiiiiiiiiiiiiiii");
    	    default: format(IItext, sizeof(IItext),"~r~iiiiiiiiiiiiiiiiiiii");
    	}
		PlayerTextDrawSetString(playerid, SpeedometrOdometr[playerid], otext);

		switch(CAR_DATA[carid][data_ENG])
		{
	      case 0: PlayerTextDrawSetString(playerid,SpeedometrEngine[playerid],"ENG");
	      case 1: PlayerTextDrawSetString(playerid,SpeedometrEngine[playerid],"ENG");
		}
		switch(CAR_DATA[carid][data_LAMP])
   		{
      		case 0: PlayerTextDrawSetString(playerid,SpeedometrLamp[playerid],"LGH");
      		case 1: PlayerTextDrawSetString(playerid,SpeedometrLamp[playerid],"LGH");
   		}
		switch(CAR_DATA[carid][data_LOCK])
   		{
      		case 0: PlayerTextDrawSetString(playerid,SpeedometrLock[playerid],"LOCK");
      		case 1: PlayerTextDrawSetString(playerid,SpeedometrLock[playerid],"LOCK");
   		}
	}
	return true;
}

 

Share this post


Link to post
Share on other sites

На этот попробуй замени и скажи результат. И да большой код нужно брать под спойлер еще. https://pawno-rus.ru/osnova.html/faq/spoiler-and-code/ -- для ознакомления

Спойлер

public SpeedUpdate(playerid)
{
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new carid = GetPlayerVehicleID(playerid);

        if(GetPlayerDistanceFromPoint(playerid, CAR_DATA[carid][data_PosX], CAR_DATA[carid][data_PosY], CAR_DATA[carid][data_PosZ]) > 300.0)
		{
		    CAR_DATA[carid][data_ODOM]++;
		    GetPlayerPos(playerid, CAR_DATA[carid][data_PosX], CAR_DATA[carid][data_PosY], CAR_DATA[carid][data_PosZ]);
		}
		format(otext, 8, "%d", CAR_DATA[carid][data_ODOM]); 
		if(PLAYER_DATA[playerid][data_CT_NUMBER] != 0) RepairVehicle(carid);
		
		
		
		new stext[4], otext[8],ftext[10],IItext[24];
		format(stext, sizeof(stext),"%.0f", Player_Speed(playerid)*1.5);
		PlayerTextDrawSetString(playerid,SpeedometrSpeed[playerid],stext);
        format(ftext, sizeof(ftext),"%d", CAR_DATA[carid][data_FUEL]);
        PlayerTextDrawSetString(playerid,SpeedometrFuel[playerid],ftext);
        switch(Player_Speed(playerid))
    	{
    	    case 0: format(IItext, sizeof(IItext),"");
    	    case 1..5: format(IItext, sizeof(IItext),"~g~i");
    	    case 6..10: format(IItext, sizeof(IItext),"~g~ii");
    	    case 11..15: format(IItext, sizeof(IItext),"~g~ii");
    	    case 16..20: format(IItext, sizeof(IItext),"~g~iii");
    	    case 21..25: format(IItext, sizeof(IItext),"~g~iiii");
    	    case 26..30: format(IItext, sizeof(IItext),"~g~iiiii");
    	    case 31..35: format(IItext, sizeof(IItext),"~g~iiiiii");
    	    case 36..40: format(IItext, sizeof(IItext),"~g~iiiiiii");
    	    case 41..45: format(IItext, sizeof(IItext),"~g~iiiiiiii");
    	    case 46..50: format(IItext, sizeof(IItext),"~g~iiiiiiiii");
    	    case 51..55: format(IItext, sizeof(IItext),"~g~iiiiiiiiii");
    	    case 56..60: format(IItext, sizeof(IItext),"~y~iiiiiiiiiii");
    	    case 61..65: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiii");
    	    case 66..70: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiiii");
    	    case 71..75: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiiiii");
    	    case 76..80: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiiiiii");
    	    case 81..85: format(IItext, sizeof(IItext),"~y~iiiiiiiiiiiiiiii");
    	    case 86..90: format(IItext, sizeof(IItext),"~r~iiiiiiiiiiiiiiiii");
    	    case 91..95: format(IItext, sizeof(IItext),"~r~iiiiiiiiiiiiiiiiii");
    	    case 96..100: format(IItext, sizeof(IItext),"~r~iiiiiiiiiiiiiiiiiii");
    	    default: format(IItext, sizeof(IItext),"~r~iiiiiiiiiiiiiiiiiiii");
    	}
		PlayerTextDrawSetString(playerid, SpeedometrOdometr[playerid], otext);

		switch(CAR_DATA[carid][data_ENG])
		{
	      case 0: PlayerTextDrawSetString(playerid,SpeedometrEngine[playerid],"ENG");
	      case 1: PlayerTextDrawSetString(playerid,SpeedometrEngine[playerid],"ENG");
		}
		switch(CAR_DATA[carid][data_LAMP])
   		{
      		case 0: PlayerTextDrawSetString(playerid,SpeedometrLamp[playerid],"LGH");
      		case 1: PlayerTextDrawSetString(playerid,SpeedometrLamp[playerid],"LGH");
   		}
		switch(CAR_DATA[carid][data_LOCK])
   		{
      		case 0: PlayerTextDrawSetString(playerid,SpeedometrLock[playerid],"LOCK");
      		case 1: PlayerTextDrawSetString(playerid,SpeedometrLock[playerid],"LOCK");
   		}
	}
	return true;
}

 

 

Share this post


Link to post
Share on other sites

@stibs жалуется

		format(otext, 8, "%d", CAR_DATA[carid][data_ODOM]);

ошибка

C:\Users\Àëåêñàíäð\Desktop\VirtualTech RP\gamemodes\new.pwn(11648) : error 017: undefined symbol "otext"

 

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

    • sawe123
      By sawe123
      Есть ли какая то система видел в моде что можно настраивать вес авто ищу такую систему.