[Ajuda] GPS Sу da a localizaзгo do seu respawn
#1

Bom, nгo vou mentir, esse sistema de GPS nгo foi eu que fiz, e achei aqui mesmo no fуrum. Porem o player tambйm nгo sabia o motivo desse erro... Eu tentei aqui mais nada... Se alguem mais avanзado ai, achar o erro e puder me ajudar a corrigir, ficarei muito grato...

O erro й o seguinte, o GPS sу mostra o nome da cidade que vocк nasceu, vocк vai andando pelo mapa, e o nome nгo vai atualizando :/
PHP код:
    if( !strcmpcmd"/gpscidade"true ))
    {
        if( 
TextLocalplayerid ][ ] == )
        {
            
tmp strtokcmdtextidx );
              if( !
strlentmp ))
              {
                
SendClientMessageplayeridCOLOR_SISTEMA"[ > ] Opзхes: ( Ativar, Desativar )" );
                 
SendClientMessageplayeridCOLOR_ERRO"[ x ] Uso correto: /GPScidade [ Opзгo ]" );
                return 
1;
            }
            if( !
strcmptmp"ativar"true ))
            {
                if( 
TextLocalplayerid ][ ] == )
                {
                    
SendClientMessageplayeridCOLOR_ERRO"[ x ] Seu gps cidade jб estб ativado !" );
                    return 
1;
                }
                
SendClientMessageplayeridCOLOR_SISTEMA"[ > ] GPS cidade ativado !" );
                
dini_IntSetfplayerid ), "StatusGPSc");
                
TextLocalplayerid ][ ] = 1;
            }
            else if( !
strcmptmp"desativar"true ))
            {
                if( 
TextLocalplayerid ][ ] == )
                {
                    
SendClientMessageplayeridCOLOR_ERRO"[ x ] Seu gps cidade jб estб desativado !" );
                    return 
1;
                }
                
SendClientMessageplayeridCOLOR_SISTEMA"[ > ] GPS cidade desativado !" );
                
dini_IntSetfplayerid ), "StatusGPSc");
                
TextLocalplayerid ][ ] = 0;
                
PlayerTextDrawHideplayeridCityPlayerplayerid ] );
            }
            return 
1;
        }
        else
          {
            
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк nгo tem um GPS Cidade !" );
            
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк adquire um nas lojas de utilitarios !" );
        }
        return 
1;
    } 
PHP код:
                case 0// 'GPS Cidade'
                
{
                    if( 
TextLocalplayerid ][ ] == )
                    {
                        if( 
GetPlayerCashplayerid ) >= 15000 )
                        {
                            
SendClientMessageplayeridCOLOR_SISTEMA"[ > ] GPS Cidade adquirido com sucesso ! Comandos GPS Cidade: /GPScidade" );
                            
TextLocalplayerid ][ ] = 1;
                              
sGivePlayerCashplayerid, -15000 );
                              
dini_IntSetfplayerid ), "GPScidade");
                              
dini_IntSetfplayerid ), "StatusGPSc");
                              
TextCreatePlayerplayerid );
                        }
                        else
                        {
                            
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк precisa ter $15000 para comprar o GPS Cidade !" );
                        }
                        return 
1;
                    }
                    else
                    {
                        
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк jб tem um GPS Cidade !" );
                    }
                    return 
1;
                } 
Obrigado (:
Reply
#2

Me manda o cуdigo de onde fica armazenado o TextLocal . forward, public.. tudo .
Reply
#3

Ai man:

PHP код:
    if( dini_Intfplayerid ), "GPScidade" ) == )
    {
        
TextLocalplayerid ][ ] = 1;
        
TextLocalplayerid ][ ] = dini_Intfplayerid ), "StatusGPSc" );
        
CityPlayerplayerid ] = CreatePlayerTextDraw(playerid,189.000000376.000000"_");
        
PlayerTextDrawAlignment(playerid,CityPlayerplayerid ], 2);
        
PlayerTextDrawBackgroundColor(playerid,CityPlayerplayerid ], 255);
        
PlayerTextDrawFont(playerid,CityPlayerplayerid ], 2);
        
PlayerTextDrawLetterSize(playerid,CityPlayerplayerid ], 0.2700001.000000);
        
PlayerTextDrawColor(playerid,CityPlayerplayerid ], -1);
        
PlayerTextDrawSetOutline(playerid,CityPlayerplayerid ], 0);
        
PlayerTextDrawSetProportional(playerid,CityPlayerplayerid ], 1);
        
PlayerTextDrawSetShadow(playerid,CityPlayerplayerid ], 1);
        
PlayerTextDrawSetSelectable(playerid,CityPlayerplayerid ], 0);
        if( 
TextLocalplayerid ][ ] == )
        {
            
PlayerTextDrawShowplayeridCityPlayerplayerid ] );
        }
    }
    if( 
dini_Intfplayerid ), "GPSlocal" ) == )
    {
        
TextLocalplayerid ][ ] = 1;
        
TextLocalplayerid ][ ] = dini_Intfplayerid ), "StatusGPSl" );
        
LocalPlayerplayerid ] = CreatePlayerTextDraw(playerid,189.000000396.000000"_");
        
PlayerTextDrawAlignment(playerid,LocalPlayerplayerid ], 2);
        
PlayerTextDrawBackgroundColor(playerid,LocalPlayerplayerid ], 255);
        
PlayerTextDrawFont(playerid,LocalPlayerplayerid ], 2);
        
PlayerTextDrawLetterSize(playerid,LocalPlayerplayerid ], 0.2000000.899999);
        
PlayerTextDrawColor(playerid,LocalPlayerplayerid ], -1);
        
PlayerTextDrawSetOutline(playerid,LocalPlayerplayerid ], 0);
        
PlayerTextDrawSetProportional(playerid,LocalPlayerplayerid ], 1);
        
PlayerTextDrawSetShadow(playerid,LocalPlayerplayerid ], 1);
        
PlayerTextDrawSetSelectable(playerid,LocalPlayerplayerid ], 0);
        if( 
TextLocalplayerid ][ ] == )
        {
            
PlayerTextDrawShowplayeridLocalPlayerplayerid ] );
        }
    }
    
playerGZtextplayerid );
}
forward citylocal_textplayer_updateplayerid );
public 
citylocal_textplayer_updateplayerid )
{
    if( 
TextLocalplayerid ][ ] == && TextLocalplayerid ][ ] == && pInfoplayerid ][ pLogin ] == false || pInfoplayerid ][ Prof ] == TAXISTA && pInfoplayerid ][ pLogin ] == false && IsPlayerInAnyVehicleplayerid ))
    {
        new
            
CidadeMAX_ZONE_NAME ]
        ;
        
GetPlayerCidadeplayeridCidadeMAX_ZONE_NAME );
        
formatgStr128,  "~r~~h~~h~Cidade~n~~y~~h~%s"Cidade );
        
PlayerTextDrawSetStringplayeridCityPlayerplayerid ], gStr );
        
PlayerTextDrawShowplayeridCityPlayerplayerid ] );
    }
    if( 
TextLocalplayerid ][ ] == && TextLocalplayerid ][ ] == && pInfoplayerid ][ pLogin ] == false || pInfoplayerid ][ Prof ] == TAXISTA && pInfoplayerid ][ pLogin ] == false && IsPlayerInAnyVehicleplayerid ))
    {
        new
            
zoneMAX_ZONE_NAME ]
        ;
        
GetPlayer2DZoneplayeridzoneMAX_ZONE_NAME );
        
formatgStr128,  "~r~~h~~h~Local~n~~y~~h~%s"zone );
        
PlayerTextDrawSetStringplayeridLocalPlayerplayerid ], gStr );
        
PlayerTextDrawShowplayeridLocalPlayerplayerid ] );
    }
    return 
1;

Reply
#4

UP !!
Reply
#5

PHP код:
    if( dini_Intfplayerid ), "GPScidade" ) == 
    { 
        
TextLocalplayerid ][ ] = 1
        
TextLocalplayerid ][ ] = dini_Intfplayerid ), "StatusGPSc" ); 

        
CityPlayerplayerid ] = CreatePlayerTextDraw(playerid,189.000000376.000000"_"); 
        
PlayerTextDrawAlignment(playerid,CityPlayerplayerid ], 2); 
        
PlayerTextDrawBackgroundColor(playerid,CityPlayerplayerid ], 255); 
        
PlayerTextDrawFont(playerid,CityPlayerplayerid ], 2); 
        
PlayerTextDrawLetterSize(playerid,CityPlayerplayerid ], 0.2700001.000000); 
        
PlayerTextDrawColor(playerid,CityPlayerplayerid ], -1); 
        
PlayerTextDrawSetOutline(playerid,CityPlayerplayerid ], 0); 
        
PlayerTextDrawSetProportional(playerid,CityPlayerplayerid ], 1); 
        
PlayerTextDrawSetShadow(playerid,CityPlayerplayerid ], 1); 
        
PlayerTextDrawSetSelectable(playerid,CityPlayerplayerid ], 0); 

        if( 
TextLocalplayerid ][ ] == 
        { 
            
PlayerTextDrawShowplayeridCityPlayerplayerid ] ); 
            
SetTimerEx("citylocal_textplayer_update"1000true"i"playerid);
        } 
    } 
    if( 
dini_Intfplayerid ), "GPSlocal" ) == 
    { 
        
TextLocalplayerid ][ ] = 1
        
TextLocalplayerid ][ ] = dini_Intfplayerid ), "StatusGPSl" ); 

        
LocalPlayerplayerid ] = CreatePlayerTextDraw(playerid,189.000000396.000000"_"); 
        
PlayerTextDrawAlignment(playerid,LocalPlayerplayerid ], 2); 
        
PlayerTextDrawBackgroundColor(playerid,LocalPlayerplayerid ], 255); 
        
PlayerTextDrawFont(playerid,LocalPlayerplayerid ], 2); 
        
PlayerTextDrawLetterSize(playerid,LocalPlayerplayerid ], 0.2000000.899999); 
        
PlayerTextDrawColor(playerid,LocalPlayerplayerid ], -1); 
        
PlayerTextDrawSetOutline(playerid,LocalPlayerplayerid ], 0); 
        
PlayerTextDrawSetProportional(playerid,LocalPlayerplayerid ], 1); 
        
PlayerTextDrawSetShadow(playerid,LocalPlayerplayerid ], 1); 
        
PlayerTextDrawSetSelectable(playerid,LocalPlayerplayerid ], 0); 

        if( 
TextLocalplayerid ][ ] == 
        { 
            
PlayerTextDrawShowplayeridLocalPlayerplayerid ] ); 
            
SetTimerEx("citylocal_textplayer_update"1000true"i"playerid);
        } 
    } 
    
playerGZtextplayerid ); 


forward citylocal_textplayer_updateplayerid ); 
public 
citylocal_textplayer_updateplayerid 

    if( 
TextLocalplayerid ][ ] == && TextLocalplayerid ][ ] == && pInfoplayerid ][ pLogin ] == false || pInfoplayerid ][ Prof ] == TAXISTA && pInfoplayerid ][ pLogin ] == false && IsPlayerInAnyVehicleplayerid )) 
    { 
        new 
            
CidadeMAX_ZONE_NAME 
        ; 
        
GetPlayerCidadeplayeridCidadeMAX_ZONE_NAME ); 
        
formatgStr128,  "~r~~h~~h~Cidade~n~~y~~h~%s"Cidade ); 
        
PlayerTextDrawSetStringplayeridCityPlayerplayerid ], gStr );
    } 
    if( 
TextLocalplayerid ][ ] == && TextLocalplayerid ][ ] == && pInfoplayerid ][ pLogin ] == false || pInfoplayerid ][ Prof ] == TAXISTA && pInfoplayerid ][ pLogin ] == false && IsPlayerInAnyVehicleplayerid )) 
    { 
        new 
            
zoneMAX_ZONE_NAME 
        ; 
        
GetPlayer2DZoneplayeridzoneMAX_ZONE_NAME ); 
        
formatgStr128,  "~r~~h~~h~Local~n~~y~~h~%s"zone ); 
        
PlayerTextDrawSetStringplayeridLocalPlayerplayerid ], gStr ); 
    } 
    return 
1

Nгo vi vocк adicionando ali o timer para atualizar a TextDraw. Pode ser isto.
Reply
#6

Nooossa Lуs <3
Obrigado mano !
+Rep
@Resolvido
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)