help with scripting this!
#3

PHP код:
stock RemovePlayerWeapon(playeridpweaponid)
{
        new 
plyWeapons[12];
        new 
plyAmmo[12];
 
        for(new 
slot 0slot != 12slot++)
        {
                new 
pweppammo;
                
GetPlayerWeaponData(playeridslotpweppammo);
 
                if(
pwep != pweaponid)
                {
                        
GetPlayerWeaponData(playeridslotplyWeapons[slot], plyAmmo[slot]);
                }
        }
 
        
ResetPlayerGuns(playerid);
        for(new 
slot 0slot != 12slot++)
        {
                
GivePlayerGun(playeridplyWeapons[slot], plyAmmo[slot]);
        }

PHP код:
public OnPlayerUpdate(playerid)
{
    new 
weaponammo;
    
GetPlayerWeaponData(playerid3weaponammo);
    if(
weapon==27)
    {
         
RemovePlayerWeapon(playerid27);
         
GivePlayerWeapon(playeridWEAPON_M4100);
    }

Reply


Messages In This Thread
help with scripting this! - by Puff - 24.01.2015, 12:27
Re: help with scripting this! - by nezo2001 - 24.01.2015, 12:33
Re: help with scripting this! - by ATGOggy - 24.01.2015, 12:34
Re: help with scripting this! - by Puff - 24.01.2015, 12:38
Re: help with scripting this! - by ATGOggy - 24.01.2015, 12:40
Re: help with scripting this! - by nezo2001 - 24.01.2015, 12:53
Re: help with scripting this! - by ATGOggy - 24.01.2015, 13:01

Forum Jump:


Users browsing this thread: 1 Guest(s)