Quote:
Originally Posted by Arkshine
No. Your code. You should really stop to assume it's a module fault each time something goes wrong. Most of time it's because you don't understand how works things and create some code without knowing what you're doing really.
|
Bro, believe me or not... Check urself... I am 101% sure it's ham module's fault.
new justconected[33];
public plugin_init()
RegisterHam(Ham_Spawn,"player","OnSpawn",1);
// ***** example of my false settings due to module problem
public client_connect(id)
justconnected[id] = 1;
public OnSpawn(id)
{
if (justconnected[id])
{
printsame(id);// won't display anything after u join
//or
set_task(5.0,"printsame",id); // will display after 5 seconds of joining no matter ur are spawned or not as it already returns true while you're connecting to the server
justconnected[id] = 0;
}
// ***** example of what i did to fix it
public client_connect(id)
justconnected[id] = 0;
public client_putinserver(id)
if (is_user_connected(id))
justconnected[id] = 1;
public OnSpawn(id)
{
if (justconnected[id])
{printsame(id);justconnected[id]=0;}
}
// **** this is what needs to be executed
public printsame(id)
client_print(id,print_chat,"CONNECTED");
conclusion - HAM MODULE has defect of reading a player as spawned when the player is just in the verge of connecting to the server. if you can prove me wrong, I would be more than happy to know because I am a programmer and not a politician :\
Anyways since you are not clairvoyant, I need to let you know that I am making a plugin to show that a user has connected after he joins either T,CT,or Spectator.... I am using event TeamInfo (for checking if the new joiner selects spectator) and this Spawn function (for T or CT join info) for my classic Counter Strike PUB server. I hope u understand why i am doing this separately.... If not, then if i select T or CT and use Teaminfo, it will directly show the HUD n other display while I select the model from model menu after I select a Team ( T or CT ) and while it displays me the HUD behind the team selection thing, and just as i press a model, the HUD will erase off maybe due to ResetHUD event....
By the ways, I am no noob who doesn't know what he's doing. It's just that I haven't released many works on Alliedmodders yet... I have 4 folders of more than 40 plugins each made by me for different purposes... and each of dem are well admired by people who have visited my server since 2 years of me having started to make plugins on my own....
No offence...