Raised This Month: $32 Target: $400
 8% 

Module: GeoIP+ (v1.3)


Post New Thread Reply   
 
Thread Tools Display Modes
souvikdas95
Senior Member
Join Date: Mar 2012
Old 06-18-2013 , 04:11   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #121

Quote:
public welcome(id)
{
new JoinMsg[128],user[32],ip[16],authid[32],city[32],region[32],country[32],data[8],rank,usertype;
get_user_name(id,user,charsmax(user));
get_user_authid(id,authid,charsmax(authid));
get_user_ip(id,ip,charsmax(ip),1);
geoip_city(ip,city,charsmax(city));
geoip_region_name(ip,region,charsmax(region)) ;
geoip_country(ip,country,charsmax(country));
rank = get_user_stats(id,data,data);
if(containi(authid,"STEAM_0:")!=-1)
usertype = 1;
else
usertype = 0;
if (is_user_admin(id))
{
set_hudmessage(225,0,0,0.01,0.20,1,6.0,6.0,0. 1,0.2,-1);
ShowSyncHudMsg(0,WelcomeMsg,"-=||**** Welcome [ADMIN] ****||=-^n-----------------------------------------^nName - %s^nRank - %i^n%s - %s^nLocation - %s,%s^nCountry - %s^n-----------------------------------------",user,rank,usertype?"SteamID":"IP",usertype? authid:ip,city,region,country);
}
formatex(JoinMsg,charsmax(JoinMsg),"^x01[Amity]^x03 %s^x04 from^x03 %s, %s, %s^x04 has^x03 Connected^x04 to the Server.^x01 [ Rank %i ]",user,city,region,country,rank);
get_players(player,count);
for (new i=0;i<count;i++)
print_message(player[i],JoinMsg);
JustJoined[id] = 0;
return PLUGIN_HANDLED
}
souvikdas95 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-18-2013 , 04:12   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #122

So ?
__________________
Arkshine is offline
souvikdas95
Senior Member
Join Date: Mar 2012
Old 06-18-2013 , 04:13   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #123

can you check why it's not working :\
souvikdas95 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-18-2013 , 04:14   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #124

I'm not clairvoyant, explain first what is your problem CLEARLY, with DETAILS.
__________________
Arkshine is offline
souvikdas95
Senior Member
Join Date: Mar 2012
Old 06-18-2013 , 06:07   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #125

I have got it... there is a problem with hamsandwich module... Player Spawn function of Hamsandwich returns true even while the player is connecting to the server. So, I couldn't see the message as it was being shown while i was connecting :\
souvikdas95 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-18-2013 , 06:32   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #126

Quote:
there is a problem with hamsandwich module
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.
__________________
Arkshine is offline
souvikdas95
Senior Member
Join Date: Mar 2012
Old 06-18-2013 , 07:13   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #127

Quote:
Originally Posted by Arkshine View Post
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...
souvikdas95 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-18-2013 , 08:31   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #128

I'm not going to read your texts since most likely irrelevant.
Just that :

Quote:
conclusion - HAM MODULE has defect of reading a player as spawned
You're wrong, you just don't understand how works the game. Spawn() is called when a player is connected to a server, meaning it's first spawn as entity to allocate things and such. At this point, player is not spawned -alive- yet. So, to properly hook when a player actually spawn alive, you have to add a is_user_alive() check. It has been said numerous times, something you can see in a lot of plugins. There is even a tuto about it.
So, yes, you have no idea what you're doing, and you complain and reject fault on module when you obviously don't understand (you don't even try) how work the game.
__________________

Last edited by Arkshine; 06-18-2013 at 08:42.
Arkshine is offline
souvikdas95
Senior Member
Join Date: Mar 2012
Old 06-19-2013 , 01:42   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #129

Oh u r predicting things dat i do... It's certainly a bug..... I get it dat ham is not meant only for alive objects..... Its probably the game's way of understanding client connecting situation as spawned and client putinserver as not yet spawned..... I know how both the functions work.... These bugs do irritate coz directly on checking for mistake the fault goes to the code.... One has to properly check each function coz their description is not enough to define the function.... Right? It depends on how the game work corresponding to the functions...
souvikdas95 is offline
souvikdas95
Senior Member
Join Date: Mar 2012
Old 06-19-2013 , 02:00   Re: Module: GeoIP Extended (v1.0.2)
Reply With Quote #130

By the ways, I am done making the plugin... It now works perfectly... I don't know If you would, so I am requesting you to see the code. I have used your extended GEO IP module which is no doubt awesome
Description - this is only a miscellaneous plugin... It's meant for server specific work and other small functions like admin show, admin color chat, welcome message + sound ...

Last edited by souvikdas95; 01-14-2015 at 02:03.
souvikdas95 is offline
Reply


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 13:35.


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