Raised This Month: $ Target: $400
 0% 

Method to detect spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-08-2010 , 08:30   Method to detect spawn
Reply With Quote #1

I wanted to ask you which one is better to detect, that the player spawned:

PHP Code:
RegisterHam(Ham_Spawn"player""PlayerSpawn"1)

public 
PlayerSpawnid )
{
    if(!
is_user_alive(id))
    return 
PLUGIN_HANDLED;
    {
        
//stuff
    
}
    return 
PLUGIN_HANDLED;

or

PHP Code:
register_event("ResetHUD""fwEvResetHUD""b");

public 
fwEvResetHUDid ) {
        if (!
is_user_alive(id))
                return;

        
fwPlayerSpawn(id);
}

public 
fwPlayerSpawnid ) {
 if(!
is_user_alive(id))
  return 
PLUGIN_HANDLED;
 
 
//stuff
 
return PLUGIN_HANDLED;

KadiR is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-08-2010 , 08:33   Re: Method to detect spawn
Reply With Quote #2

I'm surprised. You are not a beginner or you are here since 2008, such thing has been already discussed numerous times ( we can read very often someone saying how to hook properly the player's spawn ), there is even a tutorial about it, and still.. you ask again.
__________________
Arkshine is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-08-2010 , 09:54   Re: Method to detect spawn
Reply With Quote #3

Well I read that the ham way is better, but I still saw some plugins which are approved with the 2. way.
KadiR is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-08-2010 , 16:30   Re: Method to detect spawn
Reply With Quote #4

Quote:
Originally Posted by KadiR View Post
Well I read that the ham way is better, but I still saw some plugins which are approved with the 2. way.
It seems you have failed to read the date those plugins were posted. Anything approved nowadays will not have ResetHUD for spawning.
__________________
fysiks is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-08-2010 , 10:00   Re: Method to detect spawn
Reply With Quote #5

It should not be approved or the purpose is another thing. Anyway Ham_Spawn is the way to keep to hook player's spawn in most of situation. It's just a matter on what does exactly both to know how to to use it properly. For more informations, see the VEN's tuto.
__________________
Arkshine is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-08-2010 , 10:21   Re: Method to detect spawn
Reply With Quote #6

Allright, thanks for your information.
KadiR is offline
Reply



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 03:43.


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