Raised This Month: $ Target: $400
 0% 

how to make a plugin run once for a client which connects to the server.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 12-28-2011 , 22:35   Re: how to make a plugin run once for a client which connects to the server.
Reply With Quote #3

I think i know what you mean, i made this a while back. It could give an idea of how to do it.

PHP Code:
#include <amxmisc>
#include <hamsandwich>
#include <fun>
#include <cstrike>
new bool:GiftUsed[33]
public 
plugin_init() {
    
register_plugin("Welcome Gift""0.3""Ex1ne")
    
RegisterHam(Ham_Spawn"player""Spawn"1
}
public 
Spawn(id) {
    if(
GiftUsed[id] == true) {
        return 
PLUGIN_HANDLED 
    
}
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(idCSW_DEAGLE35)
    
GiftUsed[id] = true
    
return PLUGIN_HANDLED

__________________
Ex1ne is offline
 



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 12:09.


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