Jump to content

[HELP] Xp Script


Recommended Posts

hiiiii :D 

 

my give xp system :

 

function giveXP ( player, cmd, xp)
    givePlayerXP (player, xp)
end
addCommandHandler ("xp", giveXP)

 

plz give me a server side for give xp to all online players.

like : /xpall <number>

example i type /xpall 3

and send pm for all online players.

[XP-System] Admin MrThinker given 3 xp to all players!

thanks :)

 

 

 

and plz give me a server side for give xp to target player!

like /xp <PlayerID> <XpNumber>

i type /givexp 2 50

and send message for target player

admin MrThinker given you 50 Xp point

thanks!

3 minutes ago, MRThinker said:

hiiiii :D 

 

my give xp system :

 

function giveXP ( player, cmd, xp)
    givePlayerXP (player, xp)
end
addCommandHandler ("xp", giveXP)

 

plz give me a server side for give xp to all online players.

like : /xpall <number>

example i type /xpall 3>

Link to comment

ooh boy

function giveALLXP(player, _, xp)
	for _,player in ipairs(getElementsByType("player")) do
		givePlayerXP(player, tonumber(xp))
   	end
end
addCommandHandler ("xpall", giveXP)

function giveXP(player, _, to, xp)
	if to and xp then
		local p = getPlayerFromName(to)
    	if p then
		    givePlayerXP(p, tonumber(xp))
     	end
   	end
end
addCommandHandler("xp", giveXP)

 

Link to comment
59 minutes ago, #َxLysandeR said:

ooh boy


function giveALLXP(player, _, xp)
	for _,player in ipairs(getElementsByType("player")) do
		givePlayerXP(player, tonumber(xp))
   	end
end
addCommandHandler ("xpall", giveXP)

function giveXP(player, _, to, xp)
	if to and xp then
		local p = getPlayerFromName(to)
    	if p then
		    givePlayerXP(p, tonumber(xp))
     	end
   	end
end
addCommandHandler("xp", giveXP)

 

thanks, well done :)

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...