[Ajuda] Oque tem de errado?
#1

Oque tem de errado aqui?


Код:
if(strcmp(cmd,"/tvenderarma",true)==0)
    {
	    if(PlayerInfo[playerid][pJailed] != 0)
    	{
	   		SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode vender armas na cadeia!");
	   		return true;
   		}
        if(IsPlayerConnected(playerid))
	    {
		    if (PlayerInfo[playerid][pMembro] != 15 && PlayerInfo[playerid][pLider] != 15 && PlayerInfo[playerid][pMembro] != 23 && PlayerInfo[playerid][pLider] != 23)
			{
			    SendClientMessage(playerid,COLOR_GREY,"Vocк nгo й de nenhuma Organizaзгo Terrorista!");
			    return true;
			}
			giveplayerid = ReturnUser(tmp);
			//if (giveplayerid == playerid)
			//{
			//    SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode vender armas para si mesmo!");
			//    return true;
			//}
			new x_weapon[32],weapon[MAX_PLAYERS],ammo[MAX_PLAYERS],price[MAX_PLAYERS];
			tmp = strtok(cmdtext,idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid,COLOR_GRAD1,"USE: /tvenderarma [ID do Player] [weaponname]");
				SendClientMessage(playerid,COLOR_GREY,"Armas: sniper(300) granada(250) smoke(200) bazuca(500)");
				return true;
			}
			giveplayerid = ReturnUser(tmp);
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			    //if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode se vender armas!"); return true; }
					x_weapon = strtok(cmdtext,idx);
					if(!strlen(x_weapon))
					{
						SendClientMessage(playerid,COLOR_WHITE,"|__________________[ Vender Armas - Terroristas ]__________________|");
						SendClientMessage(playerid,COLOR_GREY,"USE: /mafiavarma [ID do Player] [weaponname]");
						SendClientMessage(playerid,COLOR_GREY,"Armas: sniper(300) granada(250) smoke(200) bazuca(500)");
						return true;
					}
				}
				//if(strcmp(x_weapon,"pistola",true) == 0) { if(PlayerInfo[playerid][pMats] > 49) { weapon[playerid] = 23; price[playerid] = 50; ammo[playerid] = 240; PlayerInfo[giveplayerid][pGun2] = 23; PlayerInfo[giveplayerid][pAmmo2] = 240; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"flores",true) == 0) { if(PlayerInfo[playerid][pMats] > 24) { weapon[playerid] = 14; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 14; PlayerInfo[giveplayerid][pAmmo1] = 1; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"eagle",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 24; price[playerid] = 100; ammo[playerid] = 220; PlayerInfo[giveplayerid][pGun2] = 24; PlayerInfo[giveplayerid][pAmmo2] = 220; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"mp5",true) == 0) {	if(PlayerInfo[playerid][pMats] > 149) { weapon[playerid] = 29; price[playerid] = 100; ammo[playerid] = 360; PlayerInfo[giveplayerid][pGun2] = 29; PlayerInfo[giveplayerid][pAmmo2] = 360; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"shotgun",true) == 0) {	if(PlayerInfo[playerid][pMats] > 149) { weapon[playerid] = 25; price[playerid] = 200; ammo[playerid] = 190; PlayerInfo[giveplayerid][pGun2] = 25; PlayerInfo[giveplayerid][pAmmo2] = 190; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"spas12",true) == 0) { if(PlayerInfo[playerid][pMats] > 599) { weapon[playerid] = 27; price[playerid] = 600; ammo[playerid] = 50; PlayerInfo[giveplayerid][pGun2] = 27; PlayerInfo[giveplayerid][pAmmo2] = 50; } else { SendClientMessage(playerid,COLOR_GREY,"Not enough Materials for that Weapon!"); return true; } }
				//else if(strcmp(x_weapon,"ak47",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 30; price[playerid] = 200; ammo[playerid] = 360; PlayerInfo[giveplayerid][pGun2] = 30; PlayerInfo[giveplayerid][pAmmo2] = 360; } else { SendClientMessage(playerid,COLOR_GREY,"   Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"m4",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 31; price[playerid] = 200; ammo[playerid] = 360; PlayerInfo[giveplayerid][pGun2] = 31; PlayerInfo[giveplayerid][pAmmo2] = 360; } else { SendClientMessage(playerid,COLOR_GREY,"   Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"rifle",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 33; price[playerid] = 200; ammo[playerid] = 230; PlayerInfo[giveplayerid][pGun2] = 33; PlayerInfo[giveplayerid][pAmmo2] = 230; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"bazuca",true) == 0) { if(PlayerInfo[playerid][pMats] > 500) { weapon[playerid] = 35; price[playerid] = 7000; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 4; PlayerInfo[giveplayerid][pAmmo1] = 1; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"sniper",true) == 0) { if(PlayerInfo[playerid][pMats] > 300) { weapon[playerid] = 34; price[playerid] = 10000; ammo[playerid] = 100; PlayerInfo[giveplayerid][pGun2] = 34; PlayerInfo[giveplayerid][pAmmo2] = 100; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"smoke",true) == 0) { if(PlayerInfo[playerid][pMats] > 200) { weapon[playerid] = 17; price[playerid] = 200; ammo[playerid] = 12; PlayerInfo[giveplayerid][pGun2] = 17; PlayerInfo[giveplayerid][pAmmo2] = 12; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"granada",true) == 0) { if(PlayerInfo[playerid][pMats] > 250) { weapon[playerid] = 16; price[playerid] = 5000; ammo[playerid] = 5; PlayerInfo[giveplayerid][pGun2] = 16; PlayerInfo[giveplayerid][pAmmo2] = 5; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else { SendClientMessage(playerid,COLOR_GREY,"Nome da arma invбlida!"); return true; }
				if (ProxDetectorS(5.0,playerid,giveplayerid))
				{
					if(PlayerInfo[playerid][pMiserPerk] > 0)
					{
					    new skill = 2 * PlayerInfo[playerid][pMiserPerk];
					    new mats = price[playerid] / 100;
					    price[playerid] -= (mats)*(skill);
					}
					ConsumingMoney[playerid] = 1;
					GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
					GetPlayerName(playerid,sendername,sizeof(sendername));
					format(string,sizeof(string),"Voce vendeu %s,um %s com %d ammo,para %d Materiais .",giveplayer,x_weapon,ammo[playerid],price[playerid]);
					PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
					SendClientMessage(playerid,COLOR_GRAD1,string);
					format(string,sizeof(string),"Vocк recebeu uma %s com %d a partir de muniзгo %s.",x_weapon,ammo[playerid],PlayerName(playerid));
					SendClientMessage(giveplayerid,COLOR_GRAD1,string);
					PlayerPlaySound(giveplayerid,1052,0.0,0.0,0.0);
					format(string,sizeof(string),"* %s vendeu armas para %s.",sendername ,giveplayer);
					ProxDetector(30.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					GivePlayerWeapon(giveplayerid,weapon[playerid],ammo[playerid]);
					PlayerInfo[playerid][pMats] -= price[playerid];
					//SaveVendas();
				}
				else
				{
					SendClientMessage(playerid,COLOR_GRAD1,"O cliente nгo esta proximo de vocк.");
					return true;
				}
			}
			else
			{
				format(string,sizeof(string),"%d nгo esta online este player.",giveplayerid);
				SendClientMessage(playerid,COLOR_GRAD1,string);
			}
		}
		return true;
Reply
#2

isso e voce que tem que saber como assim apareceu erro ?

o gm compila mais o comando nao funciona ?

explica ae
Reply
#3

erro '-'
Reply
#4

Quote:
Originally Posted by Amt.
Посмотреть сообщение
erro '-'
olha ve se da certo
Код:
if(strcmp(cmd,"/tvenderarma",true)==0)
    {
	    if(PlayerInfo[playerid][pJailed] != 0)
    	{
	   		SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode vender armas na cadeia!");
	   		return true;
   		}
        if(IsPlayerConnected(playerid))
	    {
		    if (PlayerInfo[playerid][pMembro] != 15 && PlayerInfo[playerid][pLider] != 15 && PlayerInfo[playerid][pMembro] != 23 && PlayerInfo[playerid][pLider] != 23)
			{
			    SendClientMessage(playerid,COLOR_GREY,"Vocк nгo й de nenhuma Organizaзгo Terrorista!");
			    return true;
			}
			giveplayerid = ReturnUser(tmp);
			//if (giveplayerid == playerid)
			//{
			//    SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode vender armas para si mesmo!");
			//    return true;
			//}
			new x_weapon[32],weapon[MAX_PLAYERS],ammo[MAX_PLAYERS],price[MAX_PLAYERS];
			tmp = strtok(cmdtext,idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid,COLOR_GRAD1,"USE: /tvenderarma [ID do Player] [weaponname]");
				SendClientMessage(playerid,COLOR_GREY,"Armas: sniper(300) granada(250) smoke(200) bazuca(500)");
				return true;
			}
			giveplayerid = ReturnUser(tmp);
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			    //if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode se vender armas!"); return true; }
					x_weapon = strtok(cmdtext,idx);
					if(!strlen(x_weapon))
					{
						SendClientMessage(playerid,COLOR_WHITE,"|__________________[ Vender Armas - Terroristas ]__________________|");
						SendClientMessage(playerid,COLOR_GREY,"USE: /mafiavarma [ID do Player] [weaponname]");
						SendClientMessage(playerid,COLOR_GREY,"Armas: sniper(300) granada(250) smoke(200) bazuca(500)");
						return true;
					}
				}
				//if(strcmp(x_weapon,"pistola",true) == 0) { if(PlayerInfo[playerid][pMats] > 49) { weapon[playerid] = 23; price[playerid] = 50; ammo[playerid] = 240; PlayerInfo[giveplayerid][pGun2] = 23; PlayerInfo[giveplayerid][pAmmo2] = 240; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"flores",true) == 0) { if(PlayerInfo[playerid][pMats] > 24) { weapon[playerid] = 14; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 14; PlayerInfo[giveplayerid][pAmmo1] = 1; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"eagle",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 24; price[playerid] = 100; ammo[playerid] = 220; PlayerInfo[giveplayerid][pGun2] = 24; PlayerInfo[giveplayerid][pAmmo2] = 220; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"mp5",true) == 0) {	if(PlayerInfo[playerid][pMats] > 149) { weapon[playerid] = 29; price[playerid] = 100; ammo[playerid] = 360; PlayerInfo[giveplayerid][pGun2] = 29; PlayerInfo[giveplayerid][pAmmo2] = 360; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"shotgun",true) == 0) {	if(PlayerInfo[playerid][pMats] > 149) { weapon[playerid] = 25; price[playerid] = 200; ammo[playerid] = 190; PlayerInfo[giveplayerid][pGun2] = 25; PlayerInfo[giveplayerid][pAmmo2] = 190; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"spas12",true) == 0) { if(PlayerInfo[playerid][pMats] > 599) { weapon[playerid] = 27; price[playerid] = 600; ammo[playerid] = 50; PlayerInfo[giveplayerid][pGun2] = 27; PlayerInfo[giveplayerid][pAmmo2] = 50; } else { SendClientMessage(playerid,COLOR_GREY,"Not enough Materials for that Weapon!"); return true; } }
				//else if(strcmp(x_weapon,"ak47",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 30; price[playerid] = 200; ammo[playerid] = 360; PlayerInfo[giveplayerid][pGun2] = 30; PlayerInfo[giveplayerid][pAmmo2] = 360; } else { SendClientMessage(playerid,COLOR_GREY,"   Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"m4",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 31; price[playerid] = 200; ammo[playerid] = 360; PlayerInfo[giveplayerid][pGun2] = 31; PlayerInfo[giveplayerid][pAmmo2] = 360; } else { SendClientMessage(playerid,COLOR_GREY,"   Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"rifle",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 33; price[playerid] = 200; ammo[playerid] = 230; PlayerInfo[giveplayerid][pGun2] = 33; PlayerInfo[giveplayerid][pAmmo2] = 230; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"bazuca",true) == 0) { if(PlayerInfo[playerid][pMats] > 500) { weapon[playerid] = 35; price[playerid] = 7000; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 4; PlayerInfo[giveplayerid][pAmmo1] = 1; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"sniper",true) == 0) { if(PlayerInfo[playerid][pMats] > 300) { weapon[playerid] = 34; price[playerid] = 10000; ammo[playerid] = 100; PlayerInfo[giveplayerid][pGun2] = 34; PlayerInfo[giveplayerid][pAmmo2] = 100; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"smoke",true) == 0) { if(PlayerInfo[playerid][pMats] > 200) { weapon[playerid] = 17; price[playerid] = 200; ammo[playerid] = 12; PlayerInfo[giveplayerid][pGun2] = 17; PlayerInfo[giveplayerid][pAmmo2] = 12; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"granada",true) == 0) { if(PlayerInfo[playerid][pMats] > 250) { weapon[playerid] = 16; price[playerid] = 5000; ammo[playerid] = 5; PlayerInfo[giveplayerid][pGun2] = 16; PlayerInfo[giveplayerid][pAmmo2] = 5; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else { SendClientMessage(playerid,COLOR_GREY,"Nome da arma invбlida!"); return true; }
				if (ProxDetectorS(5.0,playerid,giveplayerid))
				{
					if(PlayerInfo[playerid][pMiserPerk] > 0)
					{
					    new skill = 2 * PlayerInfo[playerid][pMiserPerk];
					    new mats = price[playerid] / 100;
					    price[playerid] -= (mats)*(skill);
					}
					ConsumingMoney[playerid] = 1;
					GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
					GetPlayerName(playerid,sendername,sizeof(sendername));
					format(string,sizeof(string),"Voce vendeu %s,um %s com %d ammo,para %d Materiais .",giveplayer,x_weapon,ammo[playerid],price[playerid]);
					PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
					SendClientMessage(playerid,COLOR_GRAD1,string);
					format(string,sizeof(string),"Vocк recebeu uma %s com %d a partir de muniзгo %s.",x_weapon,ammo[playerid],PlayerName(playerid));
					SendClientMessage(giveplayerid,COLOR_GRAD1,string);
					PlayerPlaySound(giveplayerid,1052,0.0,0.0,0.0);
					format(string,sizeof(string),"* %s vendeu armas para %s.",sendername ,giveplayer);
					ProxDetector(30.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					GivePlayerWeapon(giveplayerid,weapon[playerid],ammo[playerid]);
					PlayerInfo[playerid][pMats] -= price[playerid];
					//SaveVendas();
				}
				else
				{
					SendClientMessage(playerid,COLOR_GRAD1,"O cliente nгo esta proximo de vocк.");
					return true;
				}
			}
			else
			{
				format(string,sizeof(string),"%d nгo esta online este player.",giveplayerid);
				SendClientMessage(playerid,COLOR_GRAD1,string);
			}
		}
		return true;
		}
Reply
#5

Quote:
Originally Posted by Sharonx
Посмотреть сообщение
olha ve se da certo
Код:
if(strcmp(cmd,"/tvenderarma",true)==0)
    {
	    if(PlayerInfo[playerid][pJailed] != 0)
    	{
	   		SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode vender armas na cadeia!");
	   		return true;
   		}
        if(IsPlayerConnected(playerid))
	    {
		    if (PlayerInfo[playerid][pMembro] != 15 && PlayerInfo[playerid][pLider] != 15 && PlayerInfo[playerid][pMembro] != 23 && PlayerInfo[playerid][pLider] != 23)
			{
			    SendClientMessage(playerid,COLOR_GREY,"Vocк nгo й de nenhuma Organizaзгo Terrorista!");
			    return true;
			}
			giveplayerid = ReturnUser(tmp);
			//if (giveplayerid == playerid)
			//{
			//    SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode vender armas para si mesmo!");
			//    return true;
			//}
			new x_weapon[32],weapon[MAX_PLAYERS],ammo[MAX_PLAYERS],price[MAX_PLAYERS];
			tmp = strtok(cmdtext,idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid,COLOR_GRAD1,"USE: /tvenderarma [ID do Player] [weaponname]");
				SendClientMessage(playerid,COLOR_GREY,"Armas: sniper(300) granada(250) smoke(200) bazuca(500)");
				return true;
			}
			giveplayerid = ReturnUser(tmp);
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			    //if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode se vender armas!"); return true; }
					x_weapon = strtok(cmdtext,idx);
					if(!strlen(x_weapon))
					{
						SendClientMessage(playerid,COLOR_WHITE,"|__________________[ Vender Armas - Terroristas ]__________________|");
						SendClientMessage(playerid,COLOR_GREY,"USE: /mafiavarma [ID do Player] [weaponname]");
						SendClientMessage(playerid,COLOR_GREY,"Armas: sniper(300) granada(250) smoke(200) bazuca(500)");
						return true;
					}
				}
				//if(strcmp(x_weapon,"pistola",true) == 0) { if(PlayerInfo[playerid][pMats] > 49) { weapon[playerid] = 23; price[playerid] = 50; ammo[playerid] = 240; PlayerInfo[giveplayerid][pGun2] = 23; PlayerInfo[giveplayerid][pAmmo2] = 240; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"flores",true) == 0) { if(PlayerInfo[playerid][pMats] > 24) { weapon[playerid] = 14; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 14; PlayerInfo[giveplayerid][pAmmo1] = 1; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"eagle",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 24; price[playerid] = 100; ammo[playerid] = 220; PlayerInfo[giveplayerid][pGun2] = 24; PlayerInfo[giveplayerid][pAmmo2] = 220; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"mp5",true) == 0) {	if(PlayerInfo[playerid][pMats] > 149) { weapon[playerid] = 29; price[playerid] = 100; ammo[playerid] = 360; PlayerInfo[giveplayerid][pGun2] = 29; PlayerInfo[giveplayerid][pAmmo2] = 360; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"shotgun",true) == 0) {	if(PlayerInfo[playerid][pMats] > 149) { weapon[playerid] = 25; price[playerid] = 200; ammo[playerid] = 190; PlayerInfo[giveplayerid][pGun2] = 25; PlayerInfo[giveplayerid][pAmmo2] = 190; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"spas12",true) == 0) { if(PlayerInfo[playerid][pMats] > 599) { weapon[playerid] = 27; price[playerid] = 600; ammo[playerid] = 50; PlayerInfo[giveplayerid][pGun2] = 27; PlayerInfo[giveplayerid][pAmmo2] = 50; } else { SendClientMessage(playerid,COLOR_GREY,"Not enough Materials for that Weapon!"); return true; } }
				//else if(strcmp(x_weapon,"ak47",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 30; price[playerid] = 200; ammo[playerid] = 360; PlayerInfo[giveplayerid][pGun2] = 30; PlayerInfo[giveplayerid][pAmmo2] = 360; } else { SendClientMessage(playerid,COLOR_GREY,"   Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"m4",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 31; price[playerid] = 200; ammo[playerid] = 360; PlayerInfo[giveplayerid][pGun2] = 31; PlayerInfo[giveplayerid][pAmmo2] = 360; } else { SendClientMessage(playerid,COLOR_GREY,"   Materiais insuficientes para vender esta Arma!"); return true; } }
				//else if(strcmp(x_weapon,"rifle",true) == 0) { if(PlayerInfo[playerid][pMats] > 199) { weapon[playerid] = 33; price[playerid] = 200; ammo[playerid] = 230; PlayerInfo[giveplayerid][pGun2] = 33; PlayerInfo[giveplayerid][pAmmo2] = 230; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"bazuca",true) == 0) { if(PlayerInfo[playerid][pMats] > 500) { weapon[playerid] = 35; price[playerid] = 7000; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 4; PlayerInfo[giveplayerid][pAmmo1] = 1; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"sniper",true) == 0) { if(PlayerInfo[playerid][pMats] > 300) { weapon[playerid] = 34; price[playerid] = 10000; ammo[playerid] = 100; PlayerInfo[giveplayerid][pGun2] = 34; PlayerInfo[giveplayerid][pAmmo2] = 100; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"smoke",true) == 0) { if(PlayerInfo[playerid][pMats] > 200) { weapon[playerid] = 17; price[playerid] = 200; ammo[playerid] = 12; PlayerInfo[giveplayerid][pGun2] = 17; PlayerInfo[giveplayerid][pAmmo2] = 12; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else if(strcmp(x_weapon,"granada",true) == 0) { if(PlayerInfo[playerid][pMats] > 250) { weapon[playerid] = 16; price[playerid] = 5000; ammo[playerid] = 5; PlayerInfo[giveplayerid][pGun2] = 16; PlayerInfo[giveplayerid][pAmmo2] = 5; } else { SendClientMessage(playerid,COLOR_GREY,"Materiais insuficientes para vender esta Arma!"); return true; } }
				else { SendClientMessage(playerid,COLOR_GREY,"Nome da arma invбlida!"); return true; }
				if (ProxDetectorS(5.0,playerid,giveplayerid))
				{
					if(PlayerInfo[playerid][pMiserPerk] > 0)
					{
					    new skill = 2 * PlayerInfo[playerid][pMiserPerk];
					    new mats = price[playerid] / 100;
					    price[playerid] -= (mats)*(skill);
					}
					ConsumingMoney[playerid] = 1;
					GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
					GetPlayerName(playerid,sendername,sizeof(sendername));
					format(string,sizeof(string),"Voce vendeu %s,um %s com %d ammo,para %d Materiais .",giveplayer,x_weapon,ammo[playerid],price[playerid]);
					PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
					SendClientMessage(playerid,COLOR_GRAD1,string);
					format(string,sizeof(string),"Vocк recebeu uma %s com %d a partir de muniзгo %s.",x_weapon,ammo[playerid],PlayerName(playerid));
					SendClientMessage(giveplayerid,COLOR_GRAD1,string);
					PlayerPlaySound(giveplayerid,1052,0.0,0.0,0.0);
					format(string,sizeof(string),"* %s vendeu armas para %s.",sendername ,giveplayer);
					ProxDetector(30.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					GivePlayerWeapon(giveplayerid,weapon[playerid],ammo[playerid]);
					PlayerInfo[playerid][pMats] -= price[playerid];
					//SaveVendas();
				}
				else
				{
					SendClientMessage(playerid,COLOR_GRAD1,"O cliente nгo esta proximo de vocк.");
					return true;
				}
			}
			else
			{
				format(string,sizeof(string),"%d nгo esta online este player.",giveplayerid);
				SendClientMessage(playerid,COLOR_GRAD1,string);
			}
		}
		return true;
		}
Deu certo, vlw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)