14.09.2013, 02:17
Galera meu servidor tem o sistema de GPS Local e Cidade !
GPS Local : Mostra o (Estado ) Ex : LS / SF / LV / BC / FC
GPS Cidade : Mostra a (Cidade¬¬) Ex : Mulholland / Temple / Jefferson / Idlewood
E Eles bugam,ficam travado na cidade de quando eu logo,
Exemplo : Eu nasci na minha casa em Temple,o GPS Local e CIDADE fica Bugado la
Se alguem resolver o GPS Local,eu posto o Cidade porfavor ajudem-me !
GPS Local : Mostra o (Estado ) Ex : LS / SF / LV / BC / FC
GPS Cidade : Mostra a (Cidade¬¬) Ex : Mulholland / Temple / Jefferson / Idlewood
E Eles bugam,ficam travado na cidade de quando eu logo,
Exemplo : Eu nasci na minha casa em Temple,o GPS Local e CIDADE fica Bugado la

Код:
if( !strcmp( cmd, "/gpslocal", true ))
{
if( TextLocal[ playerid ][ 1 ] == 1 )
{
tmp = strtok( cmdtext, idx );
if( !strlen( tmp ))
{
SendClientMessage( playerid, COLOR_SISTEMA, "[ > ] Opзхes: ( Ativar, Desativar )" );
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /GPSlocal [ Opзгo ]" );
return 1;
}
if( !strcmp( tmp, "ativar", true ))
{
if( TextLocal[ playerid ][ 3 ] == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Seu gps local jб estб ativado !" );
return 1;
}
SendClientMessage( playerid, COLOR_SISTEMA, "[ > ] GPS local ativado !" );
dini_IntSet( f( playerid ), "StatusGPSl", 1 );
TextLocal[ playerid ][ 3 ] = 1;
}
else if( !strcmp( tmp, "desativar", true ))
{
if( TextLocal[ playerid ][ 3 ] == 0 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Seu gps local jб estб desativado !" );
return 1;
}
SendClientMessage( playerid, COLOR_SISTEMA, "[ > ] GPS local desativado !" );
dini_IntSet( f( playerid ), "StatusGPSl", 0 );
TextLocal[ playerid ][ 3 ] = 0;
PlayerTextDrawHide( playerid, LocalPlayer[ playerid ] );
}
return 1;
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem um GPS Local !" );
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк adquire um nas lojas de utilitarios !" );
}
return 1;
}
Код:
if( dini_Int( f( playerid ), "GPSlocal" ) == 1 )
{
TextLocal[ playerid ][ 1 ] = 1;
TextLocal[ playerid ][ 3 ] = dini_Int( f( playerid ), "StatusGPSl" );
LocalPlayer[ playerid ] = CreatePlayerTextDraw(playerid,189.000000, 396.000000, "_");
PlayerTextDrawAlignment(playerid,LocalPlayer[ playerid ], 2);
PlayerTextDrawBackgroundColor(playerid,LocalPlayer[ playerid ], 255);
PlayerTextDrawFont(playerid,LocalPlayer[ playerid ], 2);
PlayerTextDrawLetterSize(playerid,LocalPlayer[ playerid ], 0.200000, 0.899999);
PlayerTextDrawColor(playerid,LocalPlayer[ playerid ], -1);
PlayerTextDrawSetOutline(playerid,LocalPlayer[ playerid ], 0);
PlayerTextDrawSetProportional(playerid,LocalPlayer[ playerid ], 1);
PlayerTextDrawSetShadow(playerid,LocalPlayer[ playerid ], 1);
PlayerTextDrawSetSelectable(playerid,LocalPlayer[ playerid ], 0);
if( TextLocal[ playerid ][ 3 ] == 1 )
{
PlayerTextDrawShow( playerid, LocalPlayer[ playerid ] );
}
}
playerGZtext( playerid );
}
forward citylocal_textplayer_update( playerid );
public citylocal_textplayer_update( playerid )
{
if( TextLocal[ playerid ][ 0 ] == 1 && TextLocal[ playerid ][ 2 ] == 1 && pInfo[ playerid ][ pLogin ] == false || pInfo[ playerid ][ Prof ] == TAXISTA && pInfo[ playerid ][ pLogin ] == false && IsPlayerInAnyVehicle( playerid ))
{
new
Cidade[ MAX_ZONE_NAME ]
;
GetPlayerCidade( playerid, Cidade, MAX_ZONE_NAME );
format( gStr, 128, "~b~~h~~h~Cidade~n~~w~~h~%s", Cidade );
PlayerTextDrawSetString( playerid, CityPlayer[ playerid ], gStr );
PlayerTextDrawShow( playerid, CityPlayer[ playerid ] );
}
if( TextLocal[ playerid ][ 1 ] == 1 && TextLocal[ playerid ][ 3 ] == 1 && pInfo[ playerid ][ pLogin ] == false || pInfo[ playerid ][ Prof ] == TAXISTA && pInfo[ playerid ][ pLogin ] == false && IsPlayerInAnyVehicle( playerid ))
{
new
zone[ MAX_ZONE_NAME ]
;
GetPlayer2DZone( playerid, zone, MAX_ZONE_NAME );
format( gStr, 128, "~r~~h~~h~Local~n~~w~~h~%s", zone );
PlayerTextDrawSetString( playerid, LocalPlayer[ playerid ], gStr );
PlayerTextDrawShow( playerid, LocalPlayer[ playerid ] );
}
return 1;
}


