Raised This Month: $ Target: $400
 0% 

Spawn counter for each player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 05-24-2013 , 02:37   Spawn counter for each player
Reply With Quote #1

Hello!
How can i count the spawns of player?


PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new spawn_count

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Spawn"player""PlayerPostSpawn"1);
}

public 
PlayerPostSpawn(id)
{
    
spawn_count++ //This is a TOTAL counter.
    //I need a counter for each player (individual spawn counter).. spawn_count(id)++ ???
    
    
    //for example
    
if(spawn_count/*(id)*/ 5)
    {
        
cs_set_user_bpammo(idCSW_HEGRENADE2)
    }
    else
        
cs_set_user_bpammo(idCSW_HEGRENADE1)
    
//for example

__________________
sorry my bad english...

Last edited by alonelive; 05-24-2013 at 02:46.
alonelive is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode