Raised This Month: $ Target: $400
 0% 

can be linked with hamspawn putinserver??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
niko1921
Member
Join Date: Sep 2014
Old 11-15-2014 , 19:08   can be linked with hamspawn putinserver??
Reply With Quote #1

can be linked with hamspawn putinserver??

This would not want to make the plugin:

I correct errors that do not know how to adapt to ham_pawn public putinserver unopened another public or whatever works in one .. because if you would follow sepearo working separately ...



PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "auto restart round knife"
#define VERSION "test1"
#define AUTHOR "KramerEditor"


new g_players
new boolg_usado // it acts just 1 time ..



public plugin_init () {
         
register_plugin ("PLUGIN""VERSION""AUTHOR")
         
RegisterHam (Ham_Spawn"player""ham_spawn"1);
        
g_players get_maxplayers ()
}
        public 
client_putinserver (id// I want no change .. I just want to occur when connecting to the server .. ..
{
        if (! 
g_usado// act 1 time - HOME
        
if (get_playersnum ()> = 2)
         {
         
server_cmd ("sv_restartround 1"// restart the round to detect more than 2 players ..
}
ham_spawn () // it acts like one once you pass the restartround and it acts no more .. or is that long after the restartround weapons. and never                  until change the map .. ie after I draw weapons that can grab back the weapons .. (only 1 time as aga in the first spawn)
{
        
strip_user_weapons (id// We take out the weapons ...
        
give_item (id"weapon_knife"// You give the knife
         
}
         
g_usado true // act 1 time up here - (vedadero)
         
}
         return 
PLUGIN_HANDLED

tranks!!

Last edited by niko1921; 11-15-2014 at 19:30.
niko1921 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-15-2014 , 19:12   Re: can be linked with hamspawn putinserver??
Reply With Quote #2

"put in server" and "ham_spawn" are not related.

What are you wanting the plugin to do? Explain in detail without using any references to the code.
__________________
fysiks is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 11-17-2014 , 02:01   Re: can be linked with hamspawn putinserver??
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
"put in server" and "ham_spawn" are not related.

What are you wanting the plugin to do? Explain in detail without using any references to the code.
For some reason, Ham_Spawn is called when client is "put in server" (then is_user_alive will return false)
__________________
simanovich is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-17-2014 , 07:41   Re: can be linked with hamspawn putinserver??
Reply With Quote #4

Quote:
Originally Posted by simanovich View Post
For some reason, Ham_Spawn is called when client is "put in server" (then is_user_alive will return false)
It is called because the Player Entity is being created. It is not a reliable substitution for client_putinserver though.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-17-2014 , 19:28   Re: can be linked with hamspawn putinserver??
Reply With Quote #5

I thought it was always before client_putinserver(). But regardless, Ham_Spawn should not be used to detect putinserver as Yami said.
__________________
fysiks is offline
niko1921
Member
Join Date: Sep 2014
Old 11-15-2014 , 19:31   Re: can be linked with hamspawn putinserver??
Reply With Quote #6

the purpose of the plugin was to detect more than 1 player on the server restart the round and strip the weapons of the players .. but once..
until the map is changed..

so it is;
new bool: g_usado

help!!me
sorry my english
niko1921 is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 11-16-2014 , 02:46   Re: can be linked with hamspawn putinserver??
Reply With Quote #7

strip weapons for all players at spawn one time ?

try offset

PHP Code:

RegisterHam
(Ham_Spawn"player""sp",1)
const 
m_iSpawnCount 365;



public 
sp(id)
{
   if(
get_pdata_int(idm_iSpawnCount,) == 1)
   {
     
strip_user_weapons(id)    
     
server_print("spawn times %d"get_pdata_int(idm_iSpawnCount,) )
   }

offset auto set to 1 when round restarts
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne 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 17:31.


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