[Pedido] resetweapons quando entrar no carro
#3

Tenta e depois me fala:

PHP код:
new Armas[MAX_PLAYERS][13];
new 
Ammo[MAX_PLAYERS][13];

public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == || newstate == 3)
    {
        
SetPVarInt(playerid"Veiculo"GetPlayerVehicleID(playerid));
        for(new 
013++)
        {
            
GetPlayerWeaponData(playeridiArmas[playerid][i], Ammo[playerid][i]);
        }
        
ResetPlayerWeapons(playerid);
        
SendClientMessage(playerid0xFFFF00FF"Suas armas foram retiradas, para evitar Drive-By. Ao sair do veiculo, elas serгo devolvidas.");
    }
    if(
oldstate == || oldstate == 3)
    {
        if(
GetVehicleModel(GetPVarInt(playerid"Veiculo")))
        {
            for(new 
013++)
            {
                
GivePlayerWeapon(playeridArmas[playerid][i], Ammo[playerid][i]);
            }
            
DeletePVar(playerid"Veiculo");
            
SendClientMessage(playerid0xFFFF00FF"Suas armas foram reentregues.");
        }
    }    
    return 
1;

Reply


Messages In This Thread
[Pedido] resetweapons quando entrar no carro - by Skoll - 10.08.2011, 11:40
Re: [Pedido] resetweapons quando entrar no carro - by Skoll - 10.08.2011, 13:45
Re: [Pedido] resetweapons quando entrar no carro - by Shadoww5 - 11.08.2011, 08:03
Re: [Pedido] resetweapons quando entrar no carro - by Skoll - 11.08.2011, 09:51

Forum Jump:


Users browsing this thread: 2 Guest(s)