[Ajuda] Por o Gps para vender ! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Por o Gps para vender ! (
/showthread.php?tid=613802)
Por o Gps para vender ! -
RianRBS - 31.07.2016
Galera й o seguinte, minha GM й baseada na Dten e tem sistema de GPS que no caso vocк digita "/Gps" ele aparece lб os locais para vocк escolher. entгo meu server tambйm tem Loja de utilidades eu estбva tentando fazer que o /Gps funciona-se sу se vocк tive-se ele comprado eu jб tentei fazer mais nгo consegui peguei a base de ums que tem aqui mais nгo consegui jб criei isso aki tudo que vou deixar abaixo
Comando Abaixo
Код:
if(strcmp("/gps", cmdtext, true, 10) == 0)
{
#if defined GpsUser
if(dini_Int(file, "GpsP") == 1)
{
SendClientMessage(playerid, 0xE60000FF, "Vocк precisa estar em um veнculo!");
return 1;
}
if(GetPVarInt(playerid, "YEAH") == 1)
{
SendClientMessage(playerid, -1, "{E60000}Desligue o GPS antes {00CCFA}/gpsoff {E60000}para poder usar novamente.");
return 1;
}
ShowPlayerDialog(playerid, GPSMenu, DIALOG_STYLE_LIST, "GPS", "Delegacias\nPrefeituras\nLojas e Diversos\nIgrejas\nHoteis\nHospitais\nUniversidades", "Selecionar", "Cancelar");
#else
SendClientMessage(playerid, Vermelho, "Vocк nгo tem GPS, compre na loja de utilidades.");
#endif
return 1;
}
Criei essa define aн abaixo
Criei esses negуcios que nгo sei o nome kk
Код:
_GpsP,
PlayerInfo[playerid][_GpsP] = dini_Int(fileinfo, "GpsP");
dini_IntSet(newfile, "GpsP", 0);
new mngpspp;
mngpspp = dini_Int(oldfile, "GpsP");
dini_IntSet(newfile, "GpsP", mngpspp);
Comando que estб dando certo, tipo vocк digita o comando e ele diz que vocк nгo tem o GPS entгo estб significa que esse comando estб funcionando.
Код:
if(strcmp(cmdtext, "/comandosgps", true) == 0)
{
#if defined GpsUser
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "GpsP") == 1)
{
SendClientMessage(playerid, Azul, "{FFD700}Para ligar o GPS digite {FF0000}/Gps");
SendClientMessage(playerid, Azul, "{FFD700}Para desligar o GPS digite {FF0000}/Gpsoff");
}
else
{
SendClientMessage(playerid, Vermelho, "Vocк nгo GPS, compre na loja de utilidades.");
}
#else
SendClientMessage(playerid, Azul, "Comando desativado temporбriamente.");
#endif
return 1;
}