[Ajuda] Como passo esse dialog para um comando ?
#17

Quote:
Originally Posted by FerrariL
View Post
Estб errado.
PHP Code:
CMD:guardararma(playeridresponselistitemparams[])
{
    if(
response)
    {
        new 
value GetSlotFree(playerid);
        new 
weapammo;
        new 
string[128];
        if(
ammo 1)
            return 
CancelSelectTextDraw(playerid), SendClientMessage(playeridCOLOR_YELLOW""), dialogArmas(playerid);
            
        if(
value != -1)
        {
            
ArmasGuardadas[playerid][Selected[playerid][value]] = weap;
            
BalasGuardadas[playerid][Selected[playerid][value]] = ammo;
        } else return 
SendClientMessage(playerid,-1,"ERRO: slots cheios");
        
        
format(stringsizeof string"Vocк guardou uma arma %s com %d balas no slot: %d. Para pegar use: /mochila"NomeItemID(ArmasGuardadas[playerid][Selected[playerid][2]]),BalasGuardadas[playerid][Selected[playerid][2]], Selected[playerid][2]);
        
SendClientMessage(playeridCOLOR_Rstring);
        
RemovePlayerWeapon(playeridweap);
        
SetPVarInt(playerid"guardando"0);
        
HideMochila(playerid);
    }
    else
        
SetPVarInt(playerid"guardando"0);

aaaaaaaaaaaaa, eu peguei o comando da dialog de quando jб ta mandando a arma pro inventбrio o comando era pra ser esse aqui

Code:
	if(!countWeapons(playerid))
		return SendClientMessage(playerid, COLOR_YELLOW, "*Vocк nгo tem uma arma com vocк."), CancelSelectTextDraw(playerid),SelectTextDraw(playerid, 0xAAAAAAFF);

	new Str[95],
		weap,
		ammo;

	MEGAString[0] = EOS;

	for(new x = 1; x != 13; x++){

		GetPlayerWeaponData(playerid, x, weap, ammo);

		if(weap && ammo){

			format(Str, 95, "{FFFFFF}Arma: {A0A0A0}%s {FFFFFF}Balas: {A0A0A0}%03d\n", GunNames[weap], ammo);
	  		strcat(MEGAString, Str);
		}else{

			strcat(MEGAString, "{FFFFFF}Arma: {A0A0A0}-------- {FFFFFF}Balas: {A0A0A0}---\n");
		}
	}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)