Raised This Month: $ Target: $400
 0% 

How to give xp away and need some menu help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 11-17-2010 , 02:25   How to give xp away and need some menu help
Reply With Quote #1

So I was wondering how to give xp away from you. Like Mike has 100xp points and Jake has 0, so Mike wants to give 50 of hes xp points to Jakes, so they both would have 50xp points.

I have tried to make a custom slap menu, but I haven't suceeded, I wan't it with the new menu style, not the old one.
vL. is offline
Gadzislaw007
Senior Member
Join Date: Nov 2009
Old 11-17-2010 , 08:54   Re: How to give xp away and need some menu help
Reply With Quote #2

Maybe give us your code, so it will be little easier to help you, instead of making everything by ourselves.

Ad 1.

PHP Code:
public give_xp(givergetteramount)
{
    new 
giName[32], geName[32]
    
get_user_name(givergiNamecharsmax(giName))
    
get_user_name(gettergeNamecharsmax(geName))
    if(
exp[giver] >= amount)
    {
        
exp[giver] = exp[victim] - amount
        exp
[getter] = exp[stealer] + amount
        
        client_print
(0print_chat"%s gave %s %d xp."giNamegeNameamount)
    }
    else if(
exp[giver] < 100)
    {
        
exp[getter] = + exp[giver]
        
exp[giver] = 0
        
        client_print
(giverprint_chat"You can give only %d xp."exp[giver])
        
        
client_print(0print_chat"%s gave %s %d xp."giNamegeNameexp[giver])
        

    }

Ad 2.
What chooses do you want to have in this menu?

Last edited by Gadzislaw007; 11-17-2010 at 08:58.
Gadzislaw007 is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 11-17-2010 , 10:07   Re: How to give xp away and need some menu help
Reply With Quote #3

Thank you for the code, will try it when I get home.

Sorry, as I said I'm not home atm so unable to give my codes. For the menu its basically a simple slap menu, with the new menu style: https://forums.alliedmods.net/showth...364#PlayerMenu
Slap damages 5->15->30->50
vL. is offline
Old 11-17-2010, 22:20
nmjv367
This message has been deleted by Exolent[jNr]. Reason: Spambot
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 11:17.


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