[Ajuda] Venda de comandos!
#1

Galera minha GM tem sistema de GPS mais no caso eu gostбria de colocar esse GPS a venda em um certo lugar, no caso eu jб coloquei... Peguei bases de uns comandos que estбva na loja para venda e fiz a mesma coisa com o comando e nгo deu certo fiquei tentando muitas vezes e nada mais eu consegui que um comando funciona-se, que no caso й o "/Comandosgps" funcionar sу se o player tiver o GPS comprado mais o /gps eu nгo consegui porfavor me ajudem, vou deixar o comando que estб funcionando e oque eu quero que funcione.

Comando que quero que funcione !

Код:
	if(strcmp("/gps", cmdtext, true, 10) == 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)
		if(!IsPlayerInAnyVehicle(playerid))
		{
			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, Azul, "Comando desativado temporбriamente.");
		#endif

		return 1;
	}
Comando que funciona !

Код:
		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;
	}
Reply
#2

pawn Код:
if(strcmp("/gps", cmdtext, true, 10) == 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) return SendClientMessage(playerid, Vermelho, "Vocк nгo GPS, compre na loja de utilidades.");
        if(!IsPlayerInAnyVehicle(playerid))
        {
            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, Azul, "Comando desativado temporбriamente.");
        #endif

        return 1;
      }
Reply
#3

Quote:
Originally Posted by Jimmmy
Посмотреть сообщение
pawn Код:
if(strcmp("/gps", cmdtext, true, 10) == 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) return SendClientMessage(playerid, Vermelho, "Vocк nгo GPS, compre na loja de utilidades.");
        if(!IsPlayerInAnyVehicle(playerid))
        {
            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, Azul, "Comando desativado temporбriamente.");
        #endif

        return 1;
      }
Owww valeu ae mano passei mow tempгo tentando fazer isso eu tava fazendo um pouco engual o seu mais o gps nгo abria valeu ae

Resolvido
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)