Raised This Month: $ Target: $400
 0% 

XP system help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XsupamanX
Junior Member
Join Date: Sep 2004
Old 09-19-2004 , 14:57   XP system help
Reply With Quote #1

Ok ppl im working on a xp based plugin and cant get that damm xp change i made it show p on screen like XP:0 when i wana add xp like this code:
XP[id] + 4 with a cmd to test it it doesnt change how can i make it change plz help thx in advance
XsupamanX is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-19-2004 , 15:14  
Reply With Quote #2

use
Code:
xp[id] += 4
FeuerSturm is offline
XsupamanX
Junior Member
Join Date: Sep 2004
Old 09-19-2004 , 15:21  
Reply With Quote #3

Code:
//AMXX Plugin by SupaMan represents a MMORPG game MU (www.muonline.com)
//CMDS:
//
//CVARS:
//mu_savexp default 1 //saves xp into fles
/////////////////////////////////////////////INCLUDES///////////////////////////////////////////////
#include <amxmod>
#include <string>
#define HMCHAN_NOTICE 504
#define HMCHAN_PLAYERINFO 1089
/////////////////////////////////////////////precache///////////////////////////////////////////////
public plugin_precache() {
if (file_exists("sound/MU/iTitle.wav")) precache_sound("MU/iTitle.wav")
}
/////////////////////////////////////////////plugin/////////////////////////////////////////////////
public plugin_init() {
register_cvar("mu_savexp", "1",FCVAR_SERVER)
set_task(120.0, "servernotice", 0, "", 0, "b")
set_task(1.0, "statmenu", 0, "", 0, "b")
register_clcmd("mu_addxp","addxp")
register_clcmd("mu_addxp2","addxp2")
register_plugin("MU Mod", "0.3", "SupaMan")
}
/////////////////////////////////////////////STATS//////////////////////////////////////////////////
new XP[33] = 16
/////////////////////////////////////////////anounce///////////////////////////////////////////////
public servernotice(id) {
set_hudmessage(200,200,200,-1.0,0.30,5,6.0,12.0,0.1,0.5,HMCHAN_NOTICE)
show_hudmessage(0, "Sitas servas naudoja MU plugina pagal SupaMan")
}
public statmenu(id){
set_hudmessage(75,200,200,-1.0,0.86,0,6.0,2.0,0.1,0.5,HMCHAN_PLAYERINFO)
show_hudmessage (id,"EXP:%d",XP[id])
}
public addxp(id){
if(XP[id] > 1)
{
XP[id]=XP[id]+=4
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}

public addxp2(id){
XP[id] += 4
return PLUGIN_CONTINUE
}
this is the code doesnt work how you told me
XsupamanX is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-19-2004 , 15:22  
Reply With Quote #4

Code:
XP[id]=XP[id]+=4
should be
Code:
XP[id]+=4
FeuerSturm is offline
XsupamanX
Junior Member
Join Date: Sep 2004
Old 09-19-2004 , 15:27  
Reply With Quote #5

well look at the public addxp2 it has the same thing but doesnt work to maybe some strings i gota do? duno im totaly lost
XsupamanX is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-19-2004 , 15:30  
Reply With Quote #6

why do you do that:

Code:
new XP[33] = 16
i don't see a sense in that.

change it to
Code:
new XP[33]
and try again
FeuerSturm is offline
XsupamanX
Junior Member
Join Date: Sep 2004
Old 09-19-2004 , 15:32  
Reply With Quote #7

ok i will anyway thx for helping me ;)
edit:
nope doesnt work im thinking maybe i should do something in the the public where i show my exp on the screen? it refreshes every second
XsupamanX is offline
XsupamanX
Junior Member
Join Date: Sep 2004
Old 09-20-2004 , 09:10  
Reply With Quote #8

PPL plz help anyone who have made an XP system i need this badly
anyone help? or doesnt ayone know how to do this?
XsupamanX is offline
XsupamanX
Junior Member
Join Date: Sep 2004
Old 09-20-2004 , 10:48  
Reply With Quote #9

Erm who made the w3 plugin i looked in his plugin and i would like to aks him to explain alitle how he made it work
XsupamanX is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 09-20-2004 , 11:34  
Reply With Quote #10

Try registering them as concmds
Code:
register_concmd("mu_addxp","addxp",ADMIN_SLAY,"<username> Add xp.")
and
Code:
register_concmd("mu_addxp2","addxp2",ADMIN_SLAY,"<username> Add xp")
Also, your commands should
Code:
 return PLUGIN_HANDLED
so it doesn't say Invalid Command:mu_addxp when you use it.
__________________
twistedeuphoria 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 17:25.


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