Raised This Month: $81 Target: $400
 20% 

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:
    38 
    Plugin Description:
    Commands for everyone to get where a player is connected from
    Old 08-10-2007 , 03: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 - 7780 views - 6.5 KB)

    Last edited by The-Killer; 09-07-2007 at 14:05.
    The-Killer is offline
    Rebell
    Veteran Member
    Join Date: Nov 2004
    Location: GERMANY
    Old 08-10-2007 , 09: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 , 14: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
    bannanagamer.user
    Junior Member
    Join Date: Aug 2013
    Location: United States, Tennessee
    Old 09-02-2013 , 02:46   Re: Get Location
    Reply With Quote #4

    That's been disapproved because the users been inactive for more then a year.
    bannanagamer.user is offline
    Frenzzy
    SourceMod Donor
    Join Date: Jan 2007
    Location: Russia
    Old 11-26-2007 , 15:49   Re: Get Location
    Reply With Quote #5

    Make please, when you connect to the network users instead of the country show such as "LAN" (now nothing appears to the user IP-addresses: 10.0.0.0, 192.168.0.0, etc.)

    ..these can add another Cvars:
    sm_getlocation_mode - 1(Only allow "sm_getlocation_countries", default)/2(Allow all except "sm_getlocation_countries")
    sm_getlocation_countries - "NOR,DEN,DEU,RUS" (default "") - List of the countries (Only takes to users of the local network is not kick)
    sm_getlocation_reject_msg - ("Your country (%s) is not allowed on this server", default) Message that is shown to all players when a player connects
    Example: http://forums.alliedmods.net/showthread.php?t=11412
    Frenzzy is offline
    Send a message via ICQ to Frenzzy Send a message via MSN to Frenzzy Send a message via Skype™ to Frenzzy
    The-Killer
    Senior Member
    Join Date: May 2007
    Old 08-10-2007 , 22:24   Re: Get Location
    Reply With Quote #6

    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 , 22:51   Re: Get Location
    Reply With Quote #7

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

    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 , 23:45   Re: Get Location
    Reply With Quote #9

    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 , 11:00   Re: Get Location
    Reply With Quote #10

    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
    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 17:45.


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