Raised This Month: $51 Target: $400
 12% 

HeadShot Event!


Post New Thread Reply   
 
Thread Tools Display Modes
Author
CamerDisco
AlliedModders Donor
Join Date: Aug 2015
Location: Poland
Plugin ID:
5429
Plugin Version:
1.01
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    counting headshots
    Old 11-28-2016 , 14:19   HeadShot Event!
    Reply With Quote #1

    Description:
    This plugin is saving player headshots in database. You can use it for making some events on your community.Plugin is in the new syntax and with translations. I can add some other cvars if you need.

    Required:
    -MySQL connection

    Commands:
    sm_myhs - it shows your count of headshots

    Cvars:
    sm_hsevent_on 1 -
    on/off the plugin
    sm_hsevent_info_after_kill 1 - display info to client about new headshot after kill
    sm_hsevent_savetime 300.0 - as much time save headshots in database
    sm_hsevent_minplayers 2 -
    Amount of players who must be in the server to count headshots
    sm_hsevent_advert 1 - on/off advert about event
    sm_hsevent_time_advert 360.0 -
    time in float between adverts

    Installing:
    Put the files on the server and add to /addons/sourcemod/configs/databases.cfg new config:
    PHP Code:
        "hsevent"
        
    {
            
    "driver"            "mysql"
            "host"                "address"
            "database"            "name of database"
            "user"                "login"
            "pass"                "password"
        

    Additionally I'm sharing a website with statistics, you can see example on: http://sklep.max-play.pl/event

    Changes:
    - Fixed online statistics.
    Attached Files
    File Type: zip plugin files.zip (14.9 KB, 299 views)
    File Type: sp Get Plugin or Get Source (headshot_event.sp - 436 views - 6.8 KB)
    File Type: txt headshot_event.phrases.txt (1,012 Bytes, 321 views)
    File Type: smx headshot_event.smx (11.2 KB, 316 views)
    File Type: zip website 1.1.zip (56.1 KB, 201 views)
    __________________


    Max-Play.pl - the best polish servers

    Last edited by CamerDisco; 12-21-2016 at 14:54.
    CamerDisco is offline
    leetgamer
    Member
    Join Date: Mar 2011
    Old 11-29-2016 , 11:58   Re: HeadShot Event!
    Reply With Quote #2

    have some problems cant get this working i get only 500 error
    leetgamer is offline
    CamerDisco
    AlliedModders Donor
    Join Date: Aug 2015
    Location: Poland
    Old 11-29-2016 , 14:38   Re: HeadShot Event!
    Reply With Quote #3

    Plugin is working correctly? Database is connected? On website files you must put database connection too (dbconnect.php)
    __________________


    Max-Play.pl - the best polish servers
    CamerDisco is offline
    leetgamer
    Member
    Join Date: Mar 2011
    Old 11-29-2016 , 15:00   Re: HeadShot Event!
    Reply With Quote #4

    i put my MySQL server info into dbconnect.php havnt loaded plugin on server but i was thinking teh webend wuild still load without error tough ? https://recess.no/stats/
    leetgamer is offline
    CamerDisco
    AlliedModders Donor
    Join Date: Aug 2015
    Location: Poland
    Old 11-29-2016 , 15:53   Re: HeadShot Event!
    Reply With Quote #5

    Try load plugin, plugin is creating tables in the database. You don't have created tables and site won't work.
    __________________


    Max-Play.pl - the best polish servers
    CamerDisco is offline
    leetgamer
    Member
    Join Date: Mar 2011
    Old 11-29-2016 , 17:10   Re: HeadShot Event!
    Reply With Quote #6

    loaded plugin and have created table on MySQL and stats are gatehring there but website part still 500 error i think you got a code error there me personaly have newer seen this in code

    if ($ile>=1)
    {
    echo<<<END
    END;
    }
    leetgamer is offline
    CamerDisco
    AlliedModders Donor
    Join Date: Aug 2015
    Location: Poland
    Old 11-29-2016 , 17:52   Re: HeadShot Event!
    Reply With Quote #7

    Oh yes, my mistake, I uploaded a good version in first post.
    __________________


    Max-Play.pl - the best polish servers
    CamerDisco is offline
    leetgamer
    Member
    Join Date: Mar 2011
    Old 11-30-2016 , 11:11   Re: HeadShot Event!
    Reply With Quote #8

    btw you have forgot to put style.css in webfolder but i just colected style from Your event demo site so i got everything runing just wanted to tel you
    leetgamer is offline
    CamerDisco
    AlliedModders Donor
    Join Date: Aug 2015
    Location: Poland
    Old 01-09-2017 , 13:07   Re: HeadShot Event!
    Reply With Quote #9

    Someone asked me about add a counting zeus kills!
    It's possible, only you have to change:
    PHP Code:
        if(GetPlayerCount() >= minplayers.IntValue)
        {
            
    bool headshot GetEventBool(event"headshot");

            if(
    headshot
            {
                if(
    loaded[client])
                {
                    
    count[client]++;
                    
                    if(
    turn_info_after_kill.IntValue>0)
                    {
                        
    CPrintToChat(client"%T""new headshot info"LANG_SERVERcount[client]);
                    }
                }
                else 
    PrintToChat(client"error: 5");
            }
        } 
    for:
    PHP Code:
        if(GetPlayerCount() >= minplayers.IntValue)
        {
            
    char weaponname[128];
            
    GetEventString(eventweaponweaponnamesizeof(weaponname));
            
            if(
    StrContains(weaponname"weapon_taser" != -1
            {
                if(
    loaded[client])
                {
                    
    count[client]++;
                    
                    if(
    turn_info_after_kill.IntValue>0)
                    {
                        
    CPrintToChat(client"%T""new headshot info"LANG_SERVERcount[client]);
                    }
                }
            }
        } 
    __________________


    Max-Play.pl - the best polish servers
    CamerDisco is offline
    Reply



    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 18:50.


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