Jump to content

Question

Posted (edited)

Problema intalnita (descriere): Am o problema la acest script . imi arata distanta pana la checkpoint dar nu scade deloc . ramane asa
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu): 

        Float: fDistance = GetPlayerDistanceFromPoint(playerid, 2700.3777, -2388.7659, 13.7271);
		new playerState = GetPlayerState(playerid);
  		if (playerState == PLAYER_STATE_DRIVER)
  		{
    		if(!response) return 1;
      		switch(listitem)
        	{
         		case 0:
           		{
            		DisablePlayerCheckpoint(playerid);
					SetPlayerCheckpoint(playerid, 2700.3777, -2388.7659, 13.7271, 3.0);
				    format(string, sizeof(string), "~y~Mai ai~w~~h~~n~ %0.2f metri pana la destinatie.", fDistance);
			     	PlayerTextDrawSetString(playerid, InfoTD, string);
			     	PlayerTextDrawShow(playerid, InfoTD);
					Traseu[playerid] = 1;
					CPT[playerid] = 2;
     			}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:da

Edited by kiLLers10

13 answers to this question

Recommended Posts

  • 0
Posted (edited)

Adauga asta la ongamemodeinit SetTimer ("tdjob",1000,true);

Apoi asta la sfarsitul gmului si ii adaugi o restrictie de job si de hidetextdraw

forward tdjob()

 

public tdjob()
{
	for(new playerid;playerid<MAX_PLAYERS;playerid++)
	{
		Float: fDistance = GetPlayerDistanceFromPoint(playerid, 2700.3777, -2388.7659, 13.7271);
		new playerState = GetPlayerState(playerid);
  		if (playerState == PLAYER_STATE_DRIVER)
  		{
    	
					
				    format(string, sizeof(string), "~y~Mai ai~w~~h~~n~ %0.2f metri pana la destinatie.", fDistance);
			     	PlayerTextDrawSetString(playerid, InfoTD, string);
			     	PlayerTextDrawShow(playerid, InfoTD);
					Traseu[playerid] = 1;
					CPT[playerid] = 2;
         }
     }
     return1;
}
     			
Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
  • 0
Posted
SetPlayerCheckpoint(playerid, X, Y, Z, 3.0);//Setezi un Cp pana unde vrei tu
TextDrawShowForPlayer(playerid, Textdraw-ulTau);
SetTimerEx("Distance", 1000, true, "iiii", playerid,  X, Y, Z);

forward Distance(playerid, Float:X, Float:Y, Float:Z);
public Distance(playerid, Float:X, Float:Y, Float:Z)
{
    new KM = (GetPlayerDistanceFromPoint(playerid, X, Y, Z)*4)/1000;

    new Str[100];
    format(Str, 100, "%0.1f KM pana la destinatie", KM);
    TextDrawSetString(Textdraw-ulTau, Str);
}

Sper sa te ajute.

 

 

  • 0
Posted
15 minutes ago, kiLLers10 said:

nu merge . nu imi apare textdraw-ul

Dar l-ai facut?

Vezi ca textdraw-ul sa fie ceva de genul

textdraw-ul tau = CreateTextdraw(... " ");

 

 

  • 0
Posted

Nu are ce problema sa apara atata timp cat ai folosit cum ti-am spus eu.

Succes!Daca apar probleme faci alt topic.

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.