[Ajuda] Duvida de slots arma
#3

Quote:
Originally Posted by MBJ
Посмотреть сообщение
Uma base simples:

PHP код:
new Arma[12];
stock salvarArma(playeridweaponid) {
    for(new 
isizeof(Arma); i++) {
        if(
Arma[i] == 0) { //supondo que quando tem o valor 0 nгo esteja armazenando nenhuma arma
            
Arma[i] = weaponid;
            
SendClientMessage(playerid, -1"Arma salva com sucesso");
        }
    }

PHP код:
GuardarArma(playerid)
{
    new 
Arma GetPlayerWeapon(playerid);
    new 
Ammo GetPlayerAmmo(playerid);
    if(
Ammo == && weaponPlayer[playerid][Item][E_WEAPON_MAGAZINE] == 0) return SendClientMessage(playerid, -1,"Voce nao tem nenhum Pente para guardar!");
    if(
Item == 0) return SendClientMessage(playerid, -1"arma invalida!");
    if(
InventarioAmmo[0][playerid] == 0)
    {
    
        
InventarioAmmo[0][playerid] = Ammo;
        
InventarioArma[0][playerid] = Item;    
        
InventarioPente[0][playerid] = weaponPlayer[playerid][Item][E_WEAPON_MAGAZINE];
        
RemoverItem(playerid);
    }
    else{
        
SendClientMessage(playerid, -1"Este Slot jб estб sendo usado!");
    } 
eu tenho pronto sу tenho que usar esse loop ai entгo?
Reply


Messages In This Thread
Duvida de slots arma - by JhowWatkins - 28.11.2016, 00:12
Re: Duvida de slots arma - by MBJ - 28.11.2016, 00:21
Re: Duvida de slots arma - by JhowWatkins - 28.11.2016, 00:24
Re: Duvida de slots arma - by MBJ - 28.11.2016, 00:30
Re: Duvida de slots arma - by JhowWatkins - 28.11.2016, 00:40
Re: Duvida de slots arma - by MBJ - 28.11.2016, 02:13
Re: Duvida de slots arma - by JhowWatkins - 28.11.2016, 17:52
Re: Duvida de slots arma - by MBJ - 28.11.2016, 18:10
Re: Duvida de slots arma - by JhowWatkins - 28.11.2016, 18:21

Forum Jump:


Users browsing this thread: 1 Guest(s)