08.03.2015, 06:41
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 :/
Obrigado (:
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( !strcmp( cmd, "/gpscidade", true ))
{
if( TextLocal[ playerid ][ 0 ] == 1 )
{
tmp = strtok( cmdtext, idx );
if( !strlen( tmp ))
{
SendClientMessage( playerid, COLOR_SISTEMA, "[ > ] Opзхes: ( Ativar, Desativar )" );
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /GPScidade [ Opзгo ]" );
return 1;
}
if( !strcmp( tmp, "ativar", true ))
{
if( TextLocal[ playerid ][ 2 ] == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Seu gps cidade jб estб ativado !" );
return 1;
}
SendClientMessage( playerid, COLOR_SISTEMA, "[ > ] GPS cidade ativado !" );
dini_IntSet( f( playerid ), "StatusGPSc", 1 );
TextLocal[ playerid ][ 2 ] = 1;
}
else if( !strcmp( tmp, "desativar", true ))
{
if( TextLocal[ playerid ][ 2 ] == 0 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Seu gps cidade jб estб desativado !" );
return 1;
}
SendClientMessage( playerid, COLOR_SISTEMA, "[ > ] GPS cidade desativado !" );
dini_IntSet( f( playerid ), "StatusGPSc", 0 );
TextLocal[ playerid ][ 2 ] = 0;
PlayerTextDrawHide( playerid, CityPlayer[ playerid ] );
}
return 1;
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem um GPS Cidade !" );
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк adquire um nas lojas de utilitarios !" );
}
return 1;
}
PHP код:
case 0: // 'GPS Cidade'
{
if( TextLocal[ playerid ][ 0 ] == 0 )
{
if( GetPlayerCash( playerid ) >= 15000 )
{
SendClientMessage( playerid, COLOR_SISTEMA, "[ > ] GPS Cidade adquirido com sucesso ! Comandos GPS Cidade: /GPScidade" );
TextLocal[ playerid ][ 0 ] = 1;
sGivePlayerCash( playerid, -15000 );
dini_IntSet( f( playerid ), "GPScidade", 1 );
dini_IntSet( f( playerid ), "StatusGPSc", 0 );
TextCreatePlayer( playerid );
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк precisa ter $15000 para comprar o GPS Cidade !" );
}
return 1;
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк jб tem um GPS Cidade !" );
}
return 1;
}