Raised This Month: $ Target: $400
 0% 

Player Points


Post New Thread Reply   
 
Thread Tools Display Modes
kil0
Member
Join Date: Feb 2007
Location: 63.208.142.14:27015
Old 07-03-2007 , 13:02   Re: Player Points
Reply With Quote #81

Dev hows the plugin going?
Again thanks for everything.
I can't wait to have this up and running on my server!
kil0 is offline
Send a message via AIM to kil0
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 07-03-2007 , 13:14   Re: Player Points
Reply With Quote #82

Someone can base it off of this... I started making this a long time ago for fastfrag. Let's just say I didn't have the time or will to finish it...

Note: many things do not work correctly as this was one of the earlier to mid versions... But the dev will get the idea. (SQL queries do not work IIRC)
Attached Files
File Type: sma Get Plugin or Get Source (fastfrag.sma - 488 views - 23.7 KB)
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-03-2007 , 13:53   Re: Player Points
Reply With Quote #83

I'd like to see this plugin finished! Is cool + sql . Gj !

Btw:I thought to rescript the "points_system" but too lazy!
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 07-03-2007 , 14:01   Re: Player Points
Reply With Quote #84

Ahh thanks... I just don't have the time anymore.

Just to let you all know. In mine, each kill, depending on what type of kill it was, with what, and headshot or not, is a different calculation for how many points they get.

The calculations are a bit trippy if you ask me. It does calculations between the killers and the victims points.


BTW: If you are still looking to keep your code and incorporate this, take a look at this little section.

Code:
public event_deathmsg()
{
    new killer = read_data(1);
    new victim = read_data(2);
    new headshot = read_data(3);
    
    if(g_UserPoints[victim] <= 0)
    {
        banid_user(victim);
    }
    
    new killerName[32],victimName[32];
    
    get_user_name(killer,killerName,31);
    get_user_name(victim,victimName,31);
    
    new KillerTeam = get_user_team(killer);
    new VictimTeam = get_user_team(victim);
    
    
    /*Headshot Kills*/
    // Player Killed Points / User who killed x 2.6
    new Float:headshotDeathNum = (((g_UserPoints[victim]/g_UserPoints[killer])*2.6)+5);
    new headshotDeath = (floatround(Float:headshotDeathNum,floatround_round));
    
    // Player Killed Points / User who killed x 3.0 + 4
    new Float:headshotKillNum = (((g_UserPoints[victim]/g_UserPoints[killer])*3.0)+6);
    new headshotKill = (floatround(Float:headshotKillNum,floatround_round));
    
    
    /*Knife kills*/
    // Player  Killed Points / User who killed x 2.8
    new Float:knifeDeathNum = (((g_UserPoints[victim]/g_UserPoints[killer])*2.8)+6);
    new knifeDeath = (floatround(Float:knifeDeathNum,floatround_round));
    
    // Player Killed Points / User who killed x 3.2 + 10
    new Float:knifeKillNum = (((g_UserPoints[victim]/g_UserPoints[killer])*3.2)+10);
    new knifeKill = (floatround(Float:knifeKillNum,floatround_round));
    
    
    
    /*Normal Body Shot Kills*/
    // Player Killed Points / User who killed x 2.2
    new Float:bodyDeathNum = (((g_UserPoints[victim]/g_UserPoints[killer])*2.2)+2);
    new bodyDeath = (floatround(Float:bodyDeathNum,floatround_round));
    
    // Player Killed Points / User who killed x 2.6
    new Float:bodyKillNum = (((g_UserPoints[victim]/g_UserPoints[killer])*2.6)+2);
    new bodyKill = (floatround(Float:bodyKillNum,floatround_round));
    
    
    
    /*Grenade Kills*/
    // Player Killed Points / User who killed x 2.4
    new Float:grenadeDeathNum = (((g_UserPoints[victim]/g_UserPoints[killer])*2.4)+3);
    new grenadeDeath = (floatround(Float:grenadeDeathNum,floatround_round));
    
    // Player Killed Points / User who killed x 2.8 + 4
    new Float:grenadeKillNum = (((g_UserPoints[victim]/g_UserPoints[killer])*2.8)+4);
    new grenadeKill = (floatround(Float:grenadeKillNum,floatround_round));
    
    
    
    static weapon_name[24];
    read_data(4,weapon_name,23);
    
    // deaths by hegrenade are reported as grenade, fix
    replace(weapon_name,23,"grenade","hegrenade");
    replace(weapon_name,23,"weapon_hegrenade","hegrenade");
    
    
    if(killer == victim)
    {        
        g_UserPoints[victim] -= 25;
        client_print(victim,print_chat,"[FAST-FRAG] %s: -25 points for a suicide",victim);
        point_hud(victim);
        
        update_event(victim,6,2,25,false);
    }
    
    // team kill
    else if(KillerTeam == VictimTeam)
    {
        g_UserPoints[killer] -= 25;
        client_print(killer,print_chat,"[FAST-FRAG] %s: -25 points for killing a teammate",killer);
        point_hud(killer);
        
        update_event(killer,8,2,25,false);
        
        return PLUGIN_HANDLED;
    }
    
    // Knife kill
    // Player Killed Points / User who killed x 3.2 + 10
    else if(equal(weapon_name,"knife"))
    {
        g_UserPoints[killer] += knifeKill;
        client_print(killer,print_chat,"[FAST-FRAG] %s: +%i for a knife kill",killerName,knifeKill);
        point_hud(killer);
        
        g_UserPoints[victim] -= knifeDeath;
        client_print(victim,print_chat,"[FAST-FRAG] %s: -%i for a knife death",victimName,knifeDeath);
        point_hud(victim);
        
        update_event(killer,9,1,knifeKill,true);
        update_event(victim,10,2,knifeDeath,true);
        
        return PLUGIN_HANDLED;
    }
    else if(equal(weapon_name,"hegrenade"))
    {
        g_UserPoints[killer] += grenadeKill;
        client_print(killer,print_chat,"[FAST-FRAG] %s: +%i for a grenade kill",killerName,grenadeKill);
        point_hud(killer);
        
        g_UserPoints[victim] -= grenadeDeath;
        client_print(victim,print_chat,"[FAST-FRAG] %s: -%i for a grenade death",victimName,grenadeDeath);
        point_hud(victim);
        
        update_event(killer,11,1,grenadeKill,true);
        update_event(victim,12,2,grenadeDeath,true);
        
        return PLUGIN_HANDLED;
    }
    else if(equal(weapon_name,"worldspawn"))
    {
        g_UserPoints[victim] -= 25;
        point_hud(victim);
        client_print(victim,print_chat,"[FAST-FRAG] %s: -25 points for a suicide",victim);
        update_event(victim,8,2,25,false);
    }
    else if(headshot)
    {        
        // Player Killed Points / User who killed x 2.6
        g_UserPoints[victim] -= headshotDeath;
        client_print(victim,print_chat,"[FAST-FRAG] %s: -%i for a headshot death",victimName,headshotDeath);
        point_hud(victim);
        
        // Player Killed Points / User who killed x 3.0 + 4
        g_UserPoints[killer] += headshotKill;
        client_print(killer,print_chat,"[FAST-FRAG] %s: +%i for a headshot kill",killerName,headshotKill);
        point_hud(killer);
        
        update_event(killer,13,1,headshotKill,true);
        update_event(victim,14,2,headshotDeath,true);
        
        return PLUGIN_HANDLED;
    }
    
    //  Player Killed Points / User who killed x 2.2
    else
    {        
        g_UserPoints[killer] += bodyKill;
        client_print(killer,print_chat,"[FAST-FRAG] %s: +%i for a body shot kill",killerName,bodyKill);
        point_hud(killer);
        
        
        g_UserPoints[victim] -= bodyDeath;
        client_print(victim,print_chat,"[FAST-FRAG] %s: -%i for a body shot death",victimName,bodyDeath);
        point_hud(victim);
        
        update_event(killer,15,1,bodyKill,true);
        update_event(victim,16,2,bodyDeath,true);
        
        return PLUGIN_HANDLED;
    }
    point_hud(victim);
    return PLUGIN_CONTINUE;
}

Last edited by SweatyBanana; 07-03-2007 at 14:07.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-03-2007 , 14:36   Re: Player Points
Reply With Quote #85

Yup ! Useful for points calculation and skill! ;)
Thx.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
kil0
Member
Join Date: Feb 2007
Location: 63.208.142.14:27015
Old 07-04-2007 , 18:04   Re: Player Points
Reply With Quote #86

Holy man nice!
hey will that work on its own or is there some finishing off to be done before it will work?
Shit thanks man!!!!!
kil0 is offline
Send a message via AIM to kil0
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 07-04-2007 , 19:32   Re: Player Points
Reply With Quote #87

Quote:
Originally Posted by kil0 View Post
Holy man nice!
hey will that work on its own or is there some finishing off to be done before it will work?
Shit thanks man!!!!!
It would need to be finished off.

I was originally supposed to be paid for this plugin, but I never saw any of that money, so they never saw the code to my plugin.

It was working at one point, but they kept having me add random shit and it stopped working right.


Anyway, someone will have to fix the SQL code throughout the plugin, and they will also need to work on a bit of the kill section (I think knife kills were not showing up correctly).


Someone will have to compile that and check what exactly it needs.

The registration was set up to assign a playerid the first time in the server and compare it to one in an SQL database. If someone did not have an id, it would add them to the database under the next available id number.

May I point out that this was ages ago, before my router even went out for that matter. It's been over six months since I have looked at this.

I am sorry that I do not have the time to really go through and fix this, but I am busy at the moment.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 07-04-2007 , 20:17   Re: Player Points
Reply With Quote #88

Ok look, i'm still on making the plugin and i do not want to see anyone else starting to make the same stuff.

Why?
Well, set yourself in my shoes, you want to be a nice coder and lay down alot of time on something, just to see that someone else has already made it while your still on making it, witch means that you waste your time trying to be nice and help out.

The reason it takes so long for me to make this is due to me being busy/my computer crashing 24/7 and code losses, i'm currently onto testing the main core, please have some patience.

If anyone else is onto making this, please PM me so i know, thanks.
Deviance is offline
kil0
Member
Join Date: Feb 2007
Location: 63.208.142.14:27015
Old 07-04-2007 , 20:30   Re: Player Points
Reply With Quote #89

Oh. Gl with you comp man. It sucks when it crashes lots.
and thanks for everything to everybody so far
kil0 is offline
Send a message via AIM to kil0
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 07-04-2007 , 20:34   Re: Player Points
Reply With Quote #90

Quote:
Originally Posted by kil0 View Post
Oh. Gl with you comp man. It sucks when it crashes lots.
I just got new parts for it so that is fixed
Sorry if i sound harsh in my above post, but you'll get tired after time when you are making stuff and someone else makes it while your on it.
Deviance 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 01:14.


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