View Single Post
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-14-2011 , 03:15   Re: [CS:S] Ammo Pickup
Reply With Quote #3

Nice to see you made it. Now that we put soo much effort into those weapon ammo stocks, you don't even need them

Regarding 1) You could use the GiveAmmo method to handle the limits:
PHP Code:
/**
     * GiveAmmo gives ammo of a certain type to a player - duh.
     *
     * @param client        The client index.
     * @param ammo            Amount of bullets to give. Is capped at weapon's limit.
     * @param ammotype        Type of ammo to give to player.
     * @param suppressSound Don't play the ammo pickup sound.
     * 
     * @return Amount of bullets actually given.
     */
    
new ret SDKCall(g_hGiveAmmoclient30ammoTypetrue); 
Attached Files
File Type: txt giveammo.txt (145 Bytes, 617 views)
File Type: sp Get Plugin or Get Source (giveammo.sp - 1570 views - 1.8 KB)
__________________
Peace-Maker is offline