Raised This Month: $ Target: $400
 0% 

The Xp isnt added :S


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
maakera
Member
Join Date: Jul 2009
Old 05-16-2010 , 15:08   The Xp isnt added :S
Reply With Quote #1

why isnt the XP added :s ?
PHP Code:
public cmd_xp(idlevelcid)
{
     if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
         
new Arg1[24]
    new 
Arg2[4]
    new 
Xp str_to_num(Arg2)
    new 
szName[33];

    
//Get the command arguments from the console
    
read_argv(1Arg123)
    
read_argv(2Arg23)
          new 
player Xp
          
if (!player)
          {
               
console_print(id"Sorry, player %s could not be found or targetted!"Arg1)
          } else {
               
PlayerXP[player] += read_argv(2Arg23)
           
console_print(id"Added Xp To Player!")
           while(
PlayerXP[player] >= LEVELS[PlayerLevel[player]])
    {
      
PlayerLevel[player] += 1
      client_print
(idprint_chat"[Avatar Mod] Congratulations! You are a level %i %s!"PlayerLevel[player], CLASSES[PlayerClass[player]]) 
    
set_hudmessage(25500, -1.00.01)
    
show_hudmessage(0"%i Has Leveled UP !!!"get_user_name(playerszName31))
      } 
    
ShowHud(player)
    
SaveData(player)
    }

__________________

maakera is offline
 



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 03:44.


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