Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Pickup help

$
0
0
so iv made a pickup system from my server and it is good but when the player pickup pickup it checks if the pickup I created id I mean here is the code :
PHP Code:

            for(new 0sizeof(WeapPic); i++)
            {
                if(
IsPlayerInRangeOfPoint(playerid,3.0,WeapPic[i][wX],WeapPic[i][wY],WeapPic[i][wZ]))
                {
                    if(
WeapPic[i][wPickupM] == 356)
                    {
                        
PlayerPlaySound(playerid,1150,0.0,0.0,0.0);
                        
GivePlayerWeapon(playerid31WeapPic[i][wAmmo]);
                    }
                    if(
WeapPic[i][wPickupM] == 358)
                    {
                        
PlayerPlaySound(playerid,1150,0.0,0.0,0.0);
                        
GivePlayerWeapon(playerid34WeapPic[i][wAmmo]);
                    }
                    if(
WeapPic[i][wPickupM] == 348)
                    {
                        
PlayerPlaySound(playerid,1150,0.0,0.0,0.0);
                        
GivePlayerWeapon(playerid24WeapPic[i][wAmmo]);
                    }
                    if(
WeapPic[i][wPickupM] == 1240)
                    {
                        
PlayerPlaySound(playerid,1150,0.0,0.0,0.0);
                        
SetPlayerHealth(playeridWeapPic[i][wAmmo]);
                    }
                    if(
WeapPic[i][wPickupM] == 1242)
                    {
                        
PlayerPlaySound(playerid,1150,0.0,0.0,0.0);
                        
SetPlayerArmour(playeridWeapPic[i][wAmmo]);
                    }
                }
               } 

it is working good but is there a way to make a strock that gets the weapon id from pickup thanks.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>