• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Talk Action to add days of premium

bolero

MikeHere
Joined
Apr 13, 2009
Messages
1,146
Reaction score
12
Location
Venezuela
I need talk action to add days of premium account to X player

example: /addpremiumdays player,2

[2]= Days of premium to add.
 
Uhmm.. If any of the above worked... Try this:

Code:
local days = 5

function onSay(cid,words,param)
params = string.explode(param, ",")
playerid = getCreatureByName(params[1])
	if(params[2]) then
		days = params[2]
	end

doPlayerAddPremiumDays(playerid, days)
doPlayerPopupFYI(playerid, "You received "..days.." premium days.\nPlease, logout to take effect.")				
doPlayerPopupFYI(cid, "Player "..params[1].." received "..days.." premium days.")				

return TRUE
end

It must work x)
I corrected the part when checking if the days where more than "0". Now.. If u don't write how many premium days to add, the default would be "5". You can change it, where it says "local days = 5".
No, it wouldn't work because you didn't convert params[2] to a number :):)
 
Back
Top