|
|
#1 |
|
Little Clucker
![]() Join Date: Jan 2007
Posts: 7
Reputation: 5
|
This is my first practical plugin.
Ah... I don't know what to say. If you can't read this post (as English), I'm too foolish. * Last Edit: 04/05/2008: GeoIP*.dat were move to scriptfiles directory. Added MAX_COUNTRY_NAME. Changes arguments(Pawn function). Pawn functions will return string or value. Fixed bug in sample filterscript. Updated GeoIP*.dat. Native Functions: Code:
// Two chars into country[]. JP, US, etc... native GetCountryCode(const ipaddress[], country[], size = sizeof country); // Three chars into country[]. JPN, USA, etc... native GetCountryCode3(const ipaddress[], country[], size = sizeof country); // Full name into country[]. Japan, United States, etc... native GetCountryName(const ipaddress[], country[], size = sizeof country); // etc. Code:
GetPlayerCountryName(playerid); // return country name. GetPlayerGMT(playerid); // return GMT hour. maybe inaccurate. // etc. Example: Code:
#include <a_samp>
#include GeoIP_Plugin
...
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME], country[MAX_COUNTRY_NAME], gmt;
new string[256];
GetPlayerName(playerid, name, sizeof(name));
country = GetPlayerCountryName(playerid);
gmt = GetPlayerGMT(playerid);
format(string, sizeof(string), "[JOIN] %s (%s, GMT %d:00)", name, country, gmt);
SendClientMessageToAll(0xFFCFCFAA, string);
return 1;
}
Maybe, I can read English. Maybe. geoip_plugin-0.1.4.zip (Package) geoip_plugin-src-0.1.4.zip (Source) GeoIP_country_name_253.txt (Country name list from GeoIP.c) Last edited by dugi; 04/07/2010 at 12:43 PM. |
|
|
|
|
|
#2 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2007
Posts: 1,166
Reputation: 84
|
very nice!!
makes my GeoIP function pointless tho ![]() but who cares as this is much better ^^ |
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2006
Posts: 2,018
Reputation: 5
|
This is awesome if it works
![]() I can't test actually but will do and post comments But i already have a suggestion (easily scriptable in Pawn but may be better directly coded in the plugin) : pawn Code:
Return the GMT time of the player (based on his location of course) Also you should post a list of all detected countries ![]() Last thing: what are functions *Code3 ? |
|
|
|
|
|
#4 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Sep 2006
Location: UK
Posts: 714
Reputation: 0
|
Nice work, But it's like the same as: http://gtasync.com/?p=13
|
|
|
|
|
|
#5 | |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2007
Posts: 1,166
Reputation: 84
|
Quote:
I made a pawn function based on the gtasync one, but i got bored trying to find out how to parse the data properly through pawn (its easily possible but just the time needed for all the different outputs of all the different whois providers. |
|
|
|
|
|
|
#6 |
|
Little Clucker
![]() Join Date: Jan 2007
Posts: 7
Reputation: 5
|
I will write reply later.
today, busy. ![]() Sorry, my bad english. Thanks for comments. |
|
|
|
|
|
#7 |
|
Little Clucker
![]() Join Date: Jan 2007
Posts: 7
Reputation: 5
|
The original author?
I checked MyMessages. but, no messages. Is he MaxMind.com? If this post have any problem, I want to delete this. I'm sorry. |
|
|
|
|
|
#8 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jul 2006
Posts: 498
Reputation: 0
|
The creator of the plugin and owner of GTASync is a fella by the name of TheSmoo (alias).
I tried to get him to allow permission to release this on the forums but he didn't budge. Even though you have put great work into this the original author of the plugin doesn't want it released here. |
|
|
|
|
|
#9 |
|
Little Clucker
![]() Join Date: Jan 2007
Posts: 7
Reputation: 5
|
(I'm unsure spelling)
I think my GeoIP Plugin is not related to GTASync's Plugin(is SNet, isn't it?). his plugin: Data source - WHOIS Speed - depend network Output - detailed host data(parse needed but good) my plugin: Data source - GeoIP Speed - depend CPU Output - country and a few things By the way, his plugin source contain libGeoIP. but libGeoIP is unused currently(#include only, not called). and I don't use any his code. So, Ah...well..., I think my plugin is not related to his plugin. Maybe. Still, Cannot I release here? Should I Contact him? Thanks in advance. |
|
|
|
|
|
#10 | ||
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2007
Posts: 1,166
Reputation: 84
|
Quote:
Quote:
|
||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Prob with plugin on Windows 2008 Root | ULSA Night | Plugin Development | 0 | 10/04/2010 08:13 AM |
| [FilterScript] [FS] Short and simple teleport dialog from country to country | bartje01 | Filterscripts | 2 | 18/03/2010 12:31 PM |
| Bug detector | lithuania154 | Client Support | 2 | 15/07/2009 08:00 PM |
| KOM on MTA RU Photosession 2008 (Christmas Movie) - 27.12.2008 | Legenda | Screenshots and Videos | 8 | 12/07/2009 02:49 PM |