Raised This Month: $ Target: $400
 0% 

Prevent spawning on second connect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 08-08-2012 , 07:14   Prevent spawning on second connect
Reply With Quote #1

How can i prevent the game from spawning a person when he joins the server a second time and more in the same map?

PHP Code:
public plugin_init()
{
    
RegisterHam(Ham_Spawn"player""Fwd_PlayerSpawn_Pre"1);
}
 
public 
client_connect(id)
{
    
g_iPlayed[id]++;
}
 
public 
Fwd_PlayerSpawn_Pre(id)
{
     if(
g_iPlayed >=2)
         return 
PLUGIN_HANDLED;

will this work or do i have to silentkill the user after he spawned?
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 08-08-2012 at 08:31.
striker07 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 05:48.


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