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
pcharsi
Junior Member
Join Date: Dec 2011
Old 01-02-2012 , 10:40   Re: how to make a plugin run once for a client which connects to the server.
Reply With Quote #4

Quote:
Originally Posted by Ex1ne View Post
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 thanx man i got the idea of your to use if statement and its what i been looking for great thanx and sorry to reply late as i was sort busy these days thanx once again have a great year happy new year.
pcharsi 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