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

Need Help With XP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shockyboy
Senior Member
Join Date: Apr 2014
Location: Earth
Old 01-30-2016 , 06:10   Need Help With XP
Reply With Quote #1

I want to add few new things in to this plugin im bad at coding so i didnt try, so every time i try i end up with not compling my plugin and 100s of erros so i gave up i want to add these feature

2 Frags -> Double KILL
3 Frags -> TRIPLE KILL
5 Frags -> MULTI KILL
6 Frags -> RAMPAGE
7 Frags -> KILLING SPREE
9 Frags -> DOMINATING
11 Frags -> UNSTOPPABLE
13 Frags -> MEGA KILL
15 Frags -> ULTRA KILL
16 Frags -> EAGLE EYE
17 Frags -> OWNAGE
18 Frags -> LUDICROUS KILL
19 Frags -> HEAD HUNTER
20 Frags -> WICKED SICK
21 Frags -> MONSTER KILL
23 Frags -> HOLY SHIT
24 Frags -> G O D L I K E

when some kill 2 enemies he or she must get two 2x xp for killing double enemies
Like %s you got 2XP for Doubel kill, %s You Got 3XP For Triple kill so & so..

+ if someone killed him/her theie xp aint get deducted i.e you got 6 xp for knife kill so its, must you lost 6 xp for dying with knife so and so

can anyone help me with this
Attached Files
File Type: sma Get Plugin or Get Source (pointsmod.sma - 101 views - 70.3 KB)
__________________


[ LEARNING SCRIPTING ]
[ ||||||||||||] [ 30% ]

Last edited by Shockyboy; 01-30-2016 at 06:13.
Shockyboy is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-31-2016 , 05:45   Re: Need Help With XP
Reply With Quote #2

Just add frag count in HamKilled forward.
zmd94 is offline
Shockyboy
Senior Member
Join Date: Apr 2014
Location: Earth
Old 01-31-2016 , 09:38   Re: Need Help With XP
Reply With Quote #3

Quote:
Originally Posted by zmd94 View Post
Just add frag count in HamKilled forward.
Can you help me with the same?
__________________


[ LEARNING SCRIPTING ]
[ ||||||||||||] [ 30% ]
Shockyboy is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-03-2016 , 17:59   Re: Need Help With XP
Reply With Quote #4

PHP Code:
// Global variable
new g_iKillCount[33]

public 
fw_PlayerKilled(iVictimiKiller)  
{
    if (!
is_user_alive(iKiller) || iVictim == iKiller
        return
    
    
has_speed[victim] = false
    remove_task
(victim+TASK_SPEED_BOOST)
    
    
// Increase kill count for killer
    
g_iKillCount[iKiller] ++
    
    
// If kill count equal to two
    
if(g_iKillCount[iKiller] == 2)
    {
        
// Do something
    
}
    
    
// If kill count equal to four
    
if(g_iKillCount[iKiller] == 4)
    {
        
// Do something
    
}

zmd94 is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 02-03-2016 , 23:39   Re: Need Help With XP
Reply With Quote #5

Or in your code already g_kills is present which is counting kill you can forward this in other function as this is global variable

PHP Code:
count_kills(attackerin EventDeathMsgwpnindex )
next forward this in next function

public 
count_kills(id)
{
    if(
g_kills[id] == 2)
   {
   
//do your stuff like show hudmessage or chat "double kills"
   
}
   if(
g_kills[id] == 3)
   {
    
//do your stuff like show hudmessage or chat "Triple kills"
   
}
   if(
g_kills[id] == 4)
   {
   
//do your stuff like show hudmessage or chat "Rampage kills"
   
}

__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 02-04-2016 , 01:40   Re: Need Help With XP
Reply With Quote #6

Code:
// Global variable new g_iKillCount[33] public fw_PlayerKilled(iVictim, iKiller)  {     if (!is_user_alive(iKiller) || iVictim == iKiller || !iKiller)         return         //has_speed[victim] = false     //remove_task(victim+TASK_SPEED_BOOST)     has_speed[iVictim] = false     remove_task(iVictim+TASK_SPEED_BOOST)         // Increase kill count for killer     g_iKillCount[iKiller]++     /*     if(g_iKillCount[iKiller] == 2)     {         // Do something     }         // If kill count equal to four     if(g_iKillCount[iKiller] == 4)     {         // Do something     } */     switch( g_iKillCount[iKiller] )     {         case 1:         {             // 1 kills, what to do?         }         case 2:         {             // 2 kills, what to do?         }         case 3:         {             // 3 kills, what to do?         }         case 4:         {             // 4 kills, what to do?         }         default:         {             // no one of this values, what to do?         }     } }
__________________
Project: Among Us

Last edited by Craxor; 02-04-2016 at 01:42.
Craxor is offline
Send a message via ICQ to Craxor
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 16:29.


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