AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Get Location (https://forums.alliedmods.net/showthread.php?t=59217)

The-Killer 08-10-2007 02:03

Get Location
 
1 Attachment(s)
This is my first plugin, so started small and simple.

Provides commands for any player to find out where a player is connected from. Only tells them the country, protects other player's ips.

Requirements
Sourcemod revision 1300 or greater

Commands

sm_location <name|#userid> -- Gets a single player's locaton, prints to chat
sm_locations -- Gets everyones' location, prints to menu or console if rcon or according to cvar


Cvars
sm_getlocation_announce - 1(on, default)/0 (off) - Announce player locations on connect
sm_getlocation_inmenu - 1(menu, default) 2(console) - Display Locations in 1)menu[Default] or 0)console

Changelog:
0.1 > First Version
0.2 > Update for new GeoIP functions, NEED >r1300
0.3 > Fixed running cmds through rcon, added respond with server ip for bots
0.4 > added connect annouce and prevent it from crashing server when a player
disconnects while entering (NOT RELEASED)
0.5 > Menus added

Things to come:
Make any more suggestions??


I don't plan for this to be a big plugin but I'm open to suggestions. Please abuse the hell out of my plugin so i can learn Pawn better.

Thanks to:
BAILOPAN -- For everything he does and helping me at random times
pRED -- for helping me get started in Pawn
sslice -- for his crazy coding help/suggestions
FlyingMongoose -- for help at times
PimpinJuice
-- for help at times and his warped mind :mrgreen:
#sorucemod idlers for comments

Rebell 08-10-2007 08:46

Re: Get Location
 
OOH !

Very cool, could you add a sound when someone connects and disconnects ?
(cvar would be nice to define what sound)

cya :D

MoggieX 08-10-2007 13:55

Re: Get Location
 
Quote:

Originally Posted by Rebell (Post 515807)
OOH !

Very cool, could you add a sound when someone connects and disconnects ?
(cvar would be nice to define what sound)

cya :D

Already done :arrow: http://forums.alliedmods.net/showthread.php?t=57164

The-Killer 08-10-2007 21:24

Re: Get Location
 
Moggie's plug seems more fitting for the sounds, im just going for location info

The-Killer 08-10-2007 21:51

Re: Get Location
 
Update for new GeoIP changes... damn you bail :)

^BuGs^ 08-10-2007 22:29

Re: Get Location
 
For the bot checking, you can just set if it's a "fake" client.

The-Killer 08-10-2007 22:45

Re: Get Location
 
I tried that function and couldn't get it to work for me

Rebell 08-12-2007 10:00

Re: Get Location
 
I get an error with newest seourcemod ( 1318 ) linux:

Quote:

sm_locations
L 08/12/2007 - 15:38:36: [SM] Native "PrintToChat" reported: Client index 0 is invalid
L 08/12/2007 - 15:38:36: [SM] Displaying call stack trace:
L 08/12/2007 - 15:38:36: [SM] [0] Line 107, /home/groups/alliedmodders/forums/files/2/7/3/9/0/18963.attach::Command_Locations()
:cry:

The-Killer 08-12-2007 11:21

Re: Get Location
 
Yes thats cause youre running the cmd through rcon? I'll write a check in there for if the client is 0 then it'll use printtoserver instead of print to chat

Rebell 08-12-2007 12:17

Re: Get Location
 
Ok,

perhap you add a line in the chat when someone connects like:

"Playername from country is connecting."

Just like countryfilter. cya


All times are GMT -4. The time now is 15:52.

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