[AJUDA]Erro no /kitvip
#1

Dae pessoaaar!!

Entao meu sistema de /kitvip ta dando um erro, eu acrescentei algumas coisas nele e quando fui Compila deu aqueles 26 erros, como se faltasse alguma coisa.
Acontence que eu nao consigui ve o que ta faltando por isso se pudessem me ajuda fico grato...

Код:
    if(strcmp(cmd, "/kitvip", true) == 0)
	{
	    new location = PlayerInfo[playerid][pLocal];
	    if(location == 99 || location == 100 || location == 102)
		{
	        GetPlayerName(playerid, sendername, sizeof(sendername));
   			if(PlayerInfo[playerid][pVIP] > 2)
			{
      			new x_kitvip[256];
				x_kitvip = strtok(cmdtext, idx);
				if(!strlen(x_kitvip)) {
					SendClientMessage(playerid, COLOR_WHITE, "|__________________ KitVIP. __________________|");
					SendClientMessage(playerid, COLOR_WHITE, "|Use: /kitvip [Numero]");
					SendClientMessage(playerid, COLOR_GREY, "| 1 - Vip Bronze");
					SendClientMessage(playerid, COLOR_GREY, "| 2 - Vip Silver");
					SendClientMessage(playerid, COLOR_GREY, "| 3 - Vip Gold");
					SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
					return 1; }
                if(strcmp(x_kitvip,"1",true) == 0)
				{
			   	 	GivePlayerMoneyEx(playerid,-8000);
					format(string, sizeof(string), "* O VIP %s Pegou Seu KitVip Bronze.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					ResetPlayerWeapons(playerid);
					GivePlayerWeapon(playerid, 24, 100);
	    			GivePlayerWeapon(playerid, 30, 300);
		    		GivePlayerWeapon(playerid, 29, 300);
		    		GivePlayerWeapon(playerid, 25, 30);
		    		GivePlayerWeapon(playerid, 4, 1);
		    		GivePlayerWeapon(playerid, 34, 30);
					SetPlayerArmour(playerid, 70);
					SetPlayerHealth(playerid, 100);
					SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
			   	 	return 1;
				}
                if(strcmp(x_kitvip,"2",true) == 0)
				{
				    if(PlayerInfo[playerid][pVIP] > 3)
					{
						GivePlayerMoneyEx(playerid, -3000);
						format(string, sizeof(string), "* O VipPremium %s Pegou Seu KitVip Silver.", sendername);
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
     					ResetPlayerWeapons(playerid);
     					GivePlayerWeapon(playerid, 16, 10);
     					GivePlayerWeapon(playerid, 46, 1);
						GivePlayerWeapon(playerid, 24, 750);
	    				GivePlayerWeapon(playerid, 31, 1500);
		    			GivePlayerWeapon(playerid, 29, 1000);
		    			GivePlayerWeapon(playerid, 25, 250);
		    			GivePlayerWeapon(playerid, 4, 1);
		    			GivePlayerWeapon(playerid, 1, 1);
		    			GivePlayerWeapon(playerid, 34, 250);
						GivePlayerMoneyEx(playerid, -1000);
						SetPlayerArmour(playerid, 100);
						SetPlayerHealth(playerid, 100);
						SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
			   	 		return 1;
					}
					    if(strcmp(x_kitvip,"3",true) == 0)
						{
						if(PlayerInfo[playerid][pVIP] == 1)
					    {
					    format(string, sizeof(string), "* O VipGold %s Pegou seu KitVip Gold.", sendername);
					    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    					ResetPlayerWeapons(playerid);
     					GivePlayerWeapon(playerid, 16, 10);
     					GivePlayerWeapon(playerid, 46, 1);
						GivePlayerWeapon(playerid, 24, 750);
	    				GivePlayerWeapon(playerid, 31, 1500);
		    			GivePlayerWeapon(playerid, 29, 1000);
		    			GivePlayerWeapon(playerid, 25, 250);
		    			GivePlayerWeapon(playerid, 27, 100);
		    			GivePlayerWeapon(playerid, 4, 1);
		    			GivePlayerWeapon(playerid, 1, 1);
		    			GivePlayerWeapon(playerid, 34, 250);
						GivePlayerMoneyEx(playerid, -1000);
						SetPlayerArmour(playerid, 100);
						SetPlayerHealth(playerid, 100);
						SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
						return 1;
      					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_LIGHTRED, "Este comando nгo existe.");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб em uma loja de armas.");
		}
	}
Reply
#2

Код:
if(strcmp(cmd, "/kitvip", true) == 0)
	{
	    new location = PlayerInfo[playerid][pLocal];
	    if(location == 99 || location == 100 || location == 102)
		{
	        GetPlayerName(playerid, sendername, sizeof(sendername));
   			if(PlayerInfo[playerid][pVIP] > 2)
			{
      			new x_kitvip[256];
				x_kitvip = strtok(cmdtext, idx);
				if(!strlen(x_kitvip)) {
					SendClientMessage(playerid, COLOR_WHITE, "|__________________ KitVIP. __________________|");
					SendClientMessage(playerid, COLOR_WHITE, "|Use: /kitvip [Numero]");
					SendClientMessage(playerid, COLOR_GREY, "| 1 - Vip Bronze");
					SendClientMessage(playerid, COLOR_GREY, "| 2 - Vip Silver");
					SendClientMessage(playerid, COLOR_GREY, "| 3 - Vip Gold");
					SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
					return 1; }
                if(strcmp(x_kitvip,"1",true) == 0)
				{
			   	 	GivePlayerMoneyEx(playerid,-8000);
					format(string, sizeof(string), "* O VIP %s Pegou Seu KitVip Bronze.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					ResetPlayerWeapons(playerid);
					GivePlayerWeapon(playerid, 24, 100);
	    			GivePlayerWeapon(playerid, 30, 300);
		    		GivePlayerWeapon(playerid, 29, 300);
		    		GivePlayerWeapon(playerid, 25, 30);
		    		GivePlayerWeapon(playerid, 4, 1);
		    		GivePlayerWeapon(playerid, 34, 30);
					SetPlayerArmour(playerid, 70);
					SetPlayerHealth(playerid, 100);
					SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
			   	 	return 1;
				}
                if(strcmp(x_kitvip,"2",true) == 0)
				{
				    if(PlayerInfo[playerid][pVIP] > 3)
					{
						GivePlayerMoneyEx(playerid, -3000);
						format(string, sizeof(string), "* O VipPremium %s Pegou Seu KitVip Silver.", sendername);
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
     					ResetPlayerWeapons(playerid);
     					GivePlayerWeapon(playerid, 16, 10);
     					GivePlayerWeapon(playerid, 46, 1);
						GivePlayerWeapon(playerid, 24, 750);
	    				GivePlayerWeapon(playerid, 31, 1500);
		    			GivePlayerWeapon(playerid, 29, 1000);
		    			GivePlayerWeapon(playerid, 25, 250);
		    			GivePlayerWeapon(playerid, 4, 1);
		    			GivePlayerWeapon(playerid, 1, 1);
		    			GivePlayerWeapon(playerid, 34, 250);
						GivePlayerMoneyEx(playerid, -1000);
						SetPlayerArmour(playerid, 100);
						SetPlayerHealth(playerid, 100);
						SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
			   	 		return 1;
					}
					    if(strcmp(x_kitvip,"3",true) == 0)
						{
						if(PlayerInfo[playerid][pVIP] == 1)
					    {
					    format(string, sizeof(string), "* O VipGold %s Pegou seu KitVip Gold.", sendername);
					    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    					ResetPlayerWeapons(playerid);
     					GivePlayerWeapon(playerid, 16, 10);
     					GivePlayerWeapon(playerid, 46, 1);
						GivePlayerWeapon(playerid, 24, 750);
	    				GivePlayerWeapon(playerid, 31, 1500);
		    			GivePlayerWeapon(playerid, 29, 1000);
		    			GivePlayerWeapon(playerid, 25, 250);
		    			GivePlayerWeapon(playerid, 27, 100);
		    			GivePlayerWeapon(playerid, 4, 1);
		    			GivePlayerWeapon(playerid, 1, 1);
		    			GivePlayerWeapon(playerid, 34, 250);
						GivePlayerMoneyEx(playerid, -1000);
						SetPlayerArmour(playerid, 100);
						SetPlayerHealth(playerid, 100);
						SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
						return 1;
      					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_LIGHTRED, "Este comando nгo existe.");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб em uma loja de armas.");
		}
	}
}
tenta assim
Reply
#3

Nao deu erro nem warning, maasssssssssss, eu vo na loja de armas onde o cmd sempre funfo e quando eu executo ele manda mensagem que nao ta na loja, poderia me dize o que vc mudo?

EDIT: Axei o erro, agora mudei sу que o VIP Gold nao consegue equipa, que tenso, vo tenta arruma aki, qq coisa posto como fico o cmd agora..
Reply
#4

amigo teve um topico igual esse que eu msm tive a duvida de perguntar mais eu vo te falar aki msm abre a pasta do seu server depois a pasta scriptfiles abre a sua conta e coloca o seu VIp para 2 e naoa para 3 assim voce vai tar de vip premium e 3 e vip normal
Reply
#5

Quote:
Originally Posted by Link_
Посмотреть сообщение
amigo teve um topico igual esse que eu msm tive a duvida de perguntar mais eu vo te falar aki msm abre a pasta do seu server depois a pasta scriptfiles abre a sua conta e coloca o seu VIp para 2 e naoa para 3 assim voce vai tar de vip premium e 3 e vip normal
Como coisa q eu ja nao fiz isso, le o topico inteiro e eu o server que eu to criando nao eh paga pau do Thug pra ter soh 2 leveis de VIP..

EDIT: O erro que ta dando agora й que todos podem equipar o Kit Bronze e em qualquer lugar menos na loja de armas o que eh muito estranho..

Agora ta assim o sistema de kit:

Код:
if(strcmp(cmd, "/kitvip", true) == 0)
	{
	    new location = PlayerInfo[playerid][pLocal];
	    if(location == 99 || location == 100 || location == 102)
		{
	        GetPlayerName(playerid, sendername, sizeof(sendername));
   			if(PlayerInfo[playerid][pVIP] >= 1)
			{
      			new x_kitvip[256];
				x_kitvip = strtok(cmdtext, idx);
				if(!strlen(x_kitvip)) {
					SendClientMessage(playerid, COLOR_WHITE, "|__________________ KitVIP. __________________|");
					SendClientMessage(playerid, COLOR_WHITE, "|Use: /kitvip [Numero]");
					SendClientMessage(playerid, COLOR_GREY, "| 1 - Vip Bronze");
					SendClientMessage(playerid, COLOR_GREY, "| 2 - Vip Silver");
					SendClientMessage(playerid, COLOR_GREY, "| 3 - Vip Gold");
					SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
					return 1; }
                if(strcmp(x_kitvip,"1",true) == 0)
				{
			   	 	GivePlayerMoneyEx(playerid,-8000);
					format(string, sizeof(string), "* O VIP %s Pegou Seu KitVip Bronze.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					ResetPlayerWeapons(playerid);
					GivePlayerWeapon(playerid, 24, 100);
	    			GivePlayerWeapon(playerid, 30, 300);
		    		GivePlayerWeapon(playerid, 29, 300);
		    		GivePlayerWeapon(playerid, 25, 30);
		    		GivePlayerWeapon(playerid, 4, 1);
		    		GivePlayerWeapon(playerid, 34, 30);
					SetPlayerArmour(playerid, 70);
					SetPlayerHealth(playerid, 100);
					SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
			   	 	return 1;
				}
                if(strcmp(x_kitvip,"2",true) == 0)
				{
				    if(PlayerInfo[playerid][pVIP] > 3)
					{
						GivePlayerMoneyEx(playerid, -3000);
						format(string, sizeof(string), "* O VIP %s Pegou Seu KitVip Silver.", sendername);
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
     					ResetPlayerWeapons(playerid);
     					GivePlayerWeapon(playerid, 16, 10);
     					GivePlayerWeapon(playerid, 46, 1);
						GivePlayerWeapon(playerid, 24, 750);
	    				GivePlayerWeapon(playerid, 31, 1500);
		    			GivePlayerWeapon(playerid, 29, 1000);
		    			GivePlayerWeapon(playerid, 25, 250);
		    			GivePlayerWeapon(playerid, 4, 1);
		    			GivePlayerWeapon(playerid, 1, 1);
		    			GivePlayerWeapon(playerid, 34, 250);
						GivePlayerMoneyEx(playerid, -1000);
						SetPlayerArmour(playerid, 100);
						SetPlayerHealth(playerid, 100);
						SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
			   	 		return 1;
					}
					    if(strcmp(x_kitvip,"3",true) == 0)
						{
						if(PlayerInfo[playerid][pVIP] <= 2)
					    {
					    format(string, sizeof(string), "* O VIP %s Pegou seu KitVip Gold.", sendername);
					    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    					ResetPlayerWeapons(playerid);
     					GivePlayerWeapon(playerid, 16, 10);
     					GivePlayerWeapon(playerid, 46, 1);
						GivePlayerWeapon(playerid, 24, 750);
	    				GivePlayerWeapon(playerid, 31, 1500);
		    			GivePlayerWeapon(playerid, 29, 1000);
		    			GivePlayerWeapon(playerid, 25, 250);
		    			GivePlayerWeapon(playerid, 27, 100);
		    			GivePlayerWeapon(playerid, 4, 1);
		    			GivePlayerWeapon(playerid, 1, 1);
		    			GivePlayerWeapon(playerid, 34, 250);
						GivePlayerMoneyEx(playerid, -1000);
						SetPlayerArmour(playerid, 100);
						SetPlayerHealth(playerid, 100);
						SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
						return 1;
      					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_LIGHTRED, "Este comando nгo existe.");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб em uma loja de armas.");
		}
	}
}
Por favor se alguem souber corrigi, fale '-'
Reply
#6

pawn Код:
if(PlayerInfo[playerid][pVIP] <= 2)
Muda isso para:
pawn Код:
if(PlayerInfo[playerid][pVIP] == 1)
Na area do Vip Bronze
Reply
#7

Modifiquei o comando e corrigiu bastante coisa, mas nao ta dando pra equipa o kit gold :S

Код:
if(strcmp(cmd, "/kitvip", true) == 0)
	{
	    new location = PlayerInfo[playerid][pLocal];
	    if(location == 99 || location == 100 || location == 102)
		{
	        GetPlayerName(playerid, sendername, sizeof(sendername));
   			if(PlayerInfo[playerid][pVIP] >= 1)
			{
      			new x_kitvip[256];
				x_kitvip = strtok(cmdtext, idx);
				if(!strlen(x_kitvip)) {
					SendClientMessage(playerid, COLOR_WHITE, "|__________________ KitVIP. __________________|");
					SendClientMessage(playerid, COLOR_WHITE, "|Use: /kitvip [Numero]");
					SendClientMessage(playerid, COLOR_GREY, "| 1 - Vip Bronze");
					SendClientMessage(playerid, COLOR_GREY, "| 2 - Vip Silver");
					SendClientMessage(playerid, COLOR_GREY, "| 3 - Vip Gold");
					SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
					return 1; }
                if(strcmp(x_kitvip,"1",true) == 0)
				{
					if(PlayerInfo[playerid][pVIP] == 3)
					GivePlayerMoneyEx(playerid,-8000);
					format(string, sizeof(string), "* O VIP %s Pegou Seu KitVip Bronze.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					ResetPlayerWeapons(playerid);
					GivePlayerWeapon(playerid, 24, 100);
	    			GivePlayerWeapon(playerid, 30, 300);
		    		GivePlayerWeapon(playerid, 29, 300);
		    		GivePlayerWeapon(playerid, 25, 30);
		    		GivePlayerWeapon(playerid, 4, 1);
		    		GivePlayerWeapon(playerid, 34, 30);
					SetPlayerArmour(playerid, 70);
					SetPlayerHealth(playerid, 100);
					SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
			   	 	return 1;
				}
                if(strcmp(x_kitvip,"2",true) == 0)
				{
				    if(PlayerInfo[playerid][pVIP] == 4)
					{
						GivePlayerMoneyEx(playerid, -3000);
						format(string, sizeof(string), "* O VIP %s Pegou Seu KitVip Silver.", sendername);
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
     					ResetPlayerWeapons(playerid);
     					GivePlayerWeapon(playerid, 16, 10);
     					GivePlayerWeapon(playerid, 46, 1);
						GivePlayerWeapon(playerid, 24, 750);
	    				GivePlayerWeapon(playerid, 31, 1500);
		    			GivePlayerWeapon(playerid, 29, 1000);
		    			GivePlayerWeapon(playerid, 25, 250);
		    			GivePlayerWeapon(playerid, 4, 1);
		    			GivePlayerWeapon(playerid, 1, 1);
		    			GivePlayerWeapon(playerid, 34, 250);
						GivePlayerMoneyEx(playerid, -1000);
						SetPlayerArmour(playerid, 100);
						SetPlayerHealth(playerid, 100);
						SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
			   	 		return 1;
					}
					    if(strcmp(x_kitvip,"3",true) == 0)
						{
						if(PlayerInfo[playerid][pVIP] == 1)
					    {
					    format(string, sizeof(string), "* O VIP %s Pegou seu KitVip Gold.", sendername);
					    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    					ResetPlayerWeapons(playerid);
     					GivePlayerWeapon(playerid, 16, 10);
     					GivePlayerWeapon(playerid, 46, 1);
						GivePlayerWeapon(playerid, 24, 750);
	    				GivePlayerWeapon(playerid, 31, 1500);
		    			GivePlayerWeapon(playerid, 29, 1000);
		    			GivePlayerWeapon(playerid, 25, 250);
		    			GivePlayerWeapon(playerid, 27, 100);
		    			GivePlayerWeapon(playerid, 4, 1);
		    			GivePlayerWeapon(playerid, 1, 1);
		    			GivePlayerWeapon(playerid, 34, 250);
						GivePlayerMoneyEx(playerid, -1000);
						SetPlayerArmour(playerid, 100);
						SetPlayerHealth(playerid, 100);
						SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
						return 1;
      					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_LIGHTRED, "Este comando nгo existe.");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб em uma loja de armas.");
		}
	}
}
Vlw aos que ja ajudaram e se puderem ajuda mais uma vez, vlw mesmo xD

OBS: Vip Bronze = (PlayerInfo[playerid][pVIP] == 3)

Vip Silver = (PlayerInfo[playerid][pVIP] == 4)

Vip Gold = (PlayerInfo[playerid][pVIP] == 1)
Reply
#8

LOL? q q aparece qndo vc tenta equipar?
Reply
#9

Cara, ta bem locao mesmo, aparece que o comando nao existe...
Nao faзo nem ideia do pq ta acontecendo isso......
Reply
#10

Axo que axei o erro:
pawn Код:
if(strcmp(x_kitvip,"2",true) == 0)
                {
                    if(PlayerInfo[playerid][pVIP] == 4)
                    {
                        GivePlayerMoneyEx(playerid, -3000);
                        format(string, sizeof(string), "* O VIP %s Pegou Seu KitVip Silver.", sendername);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 16, 10);
                        GivePlayerWeapon(playerid, 46, 1);
                        GivePlayerWeapon(playerid, 24, 750);
                        GivePlayerWeapon(playerid, 31, 1500);
                        GivePlayerWeapon(playerid, 29, 1000);
                        GivePlayerWeapon(playerid, 25, 250);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 1, 1);
                        GivePlayerWeapon(playerid, 34, 250);
                        GivePlayerMoneyEx(playerid, -1000);
                        SetPlayerArmour(playerid, 100);
                        SetPlayerHealth(playerid, 100);
                        SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");
                        return 1;
                    }
                                           }
Vocк esqueceu de fechar uma '}', muda para esse que eu passei e ve se funfa ^~
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)