Raised This Month: $168 Target: $400
 42% 

Get Location


Post New Thread Reply   
 
Thread Tools Display Modes
Author
The-Killer
Senior Member
Join Date: May 2007
Plugin ID:
125
Plugin Version:
0.3
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    80 
    Plugin Description:
    Commands for everyone to get where a player is connected from
    Old 08-10-2007 , 02:03   Get Location
    Reply With Quote #1

    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
    #sorucemod idlers for comments
    Attached Files
    File Type: sp Get Plugin or Get Source (getlocation.sp - 6488 views - 6.5 KB)

    Last edited by The-Killer; 09-07-2007 at 13:05.
    The-Killer is offline
    Rebell
    Veteran Member
    Join Date: Nov 2004
    Location: GERMANY
    Old 08-10-2007 , 08:46   Re: Get Location
    Reply With Quote #2

    OOH !

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

    cya
    __________________
    Rebell is offline
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 08-10-2007 , 13:55   Re: Get Location
    Reply With Quote #3

    Quote:
    Originally Posted by Rebell View Post
    OOH !

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

    cya
    Already done http://forums.alliedmods.net/showthread.php?t=57164
    __________________
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    The-Killer
    Senior Member
    Join Date: May 2007
    Old 08-10-2007 , 21:24   Re: Get Location
    Reply With Quote #4

    Moggie's plug seems more fitting for the sounds, im just going for location info
    The-Killer is offline
    The-Killer
    Senior Member
    Join Date: May 2007
    Old 08-10-2007 , 21:51   Re: Get Location
    Reply With Quote #5

    Update for new GeoIP changes... damn you bail
    The-Killer is offline
    ^BuGs^
    Senior Member
    Join Date: May 2007
    Old 08-10-2007 , 22:29   Re: Get Location
    Reply With Quote #6

    For the bot checking, you can just set if it's a "fake" client.
    __________________
    Sourcemod Plugin Author and Plugin Approver
    "The correct way is MAXPLAYERS + 1"
    I will not take bugs/new idea reports over the forums. Please use the issue list.
    ^BuGs^ is offline
    The-Killer
    Senior Member
    Join Date: May 2007
    Old 08-10-2007 , 22:45   Re: Get Location
    Reply With Quote #7

    I tried that function and couldn't get it to work for me
    The-Killer is offline
    Rebell
    Veteran Member
    Join Date: Nov 2004
    Location: GERMANY
    Old 08-12-2007 , 10:00   Re: Get Location
    Reply With Quote #8

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

    Quote:
    sm_locations
    L 08/12/2007 - 1586: [SM] Native "PrintToChat" reported: Client index 0 is invalid
    L 08/12/2007 - 1586: [SM] Displaying call stack trace:
    L 08/12/2007 - 1586: [SM] [0] Line 107, /home/groups/alliedmodders/forums/files/2/7/3/9/0/18963.attach::Command_Locations()
    __________________
    Rebell is offline
    The-Killer
    Senior Member
    Join Date: May 2007
    Old 08-12-2007 , 11:21   Re: Get Location
    Reply With Quote #9

    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
    The-Killer is offline
    Rebell
    Veteran Member
    Join Date: Nov 2004
    Location: GERMANY
    Old 08-12-2007 , 12:17   Re: Get Location
    Reply With Quote #10

    Ok,

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

    "Playername from country is connecting."

    Just like countryfilter. cya
    __________________
    Rebell 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 09:42.


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