• 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!

Lua i got problem with script that 100% correct?!

Maxwel1

Legend Of Everything
Joined
Feb 3, 2009
Messages
196
Reaction score
1
Location
In The Jungle
PHP:
function onSay(cid, words, param)


if (param ~= "") then
	if (words == "/reward") then
		local player = getPlayerByName(param)
		if (isPlayer(player) == TRUE) then
                  if (getPlayerPromotionLevel(player) <= 1) then
			setPlayerPromotionLevel(player,getPlayerPromotionLevel(player)+2)
			doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You have changed ".. param .."\'s vocation (reward).")
else
				doPlayerSendCancel(cid,"This player is already rewarded.")
			end
		else
			doPlayerSendCancel(cid,"Player is not online.")
		end
	elseif (words == "/unreward") then
		local player = getPlayerByName(param)
		if (isPlayer(player) == TRUE) then
			if (getPlayerPromotionLevel(player) > 1) then
				setPlayerPromotionLevel(player,getPlayerPromotionLevel(player)-2)
				doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You have changed ".. param .."\'s vocation (unreward).")
			else
				doPlayerSendCancel(cid,"This player wasn't rewarded, so you can't unreward him/her.")
			end
		else
			doPlayerSendCancel(cid,"Player is not online.")
		end
	end
else
	doPlayerSendCancel(cid,"In param you must insert player name.")
end
return TRUE
end


it just reward but don unreward why?!!!!!!



any idea?
 
Bump... please guyz that script is soo important to me. all it does it when i type /reward (playername) it give + 2 promotion levels. yes i got another promotions i added to the voc.xml .. and the reward works 100% but the unreward with do -2 to the current promotion don work is it problem from the function itself or what?!!!

if u got any idea or opnion or suggestion please tell me it. it's soooo f**king important script for me. thanks alooooot


maybe it needs source editing maybe not. i donno but really need a solution


Yours:

Lion
 
Trust me it's source problem. no i don get any bug on the console. i am sure that in the source that function was set as it don accept negative variables. pretty sure and need someone pro or understand everything concerning tfs sources to fix that to me in for all new tfs releases cuz lately that function might be soo useful.


Please don be lazy or just to leave without posting a solution if u really know it. that will be so rude and also u won't find someone to help u later even if it was not concerning ots. as u treat ppl u will be treated.



Thanks



Yours:

Lion
 
Why when i ask someone that i guess he is good at tfs source and can help me he just ignore? i hate that way that ppl ignore others just cuz they know how that can be solved or just they know much knowledge. just ignore others that need help :( soo mean. although we are here just to help others and we get help back. i don have really any more words but guess ppl here just do favours for cash or donating only. and all the posts i get is just u post in wrong section. although it's source problem and they don get that.



Thanks anyway for the WELL KNOWN AND STAFF MEMBERS PERSONS that ignored my pms. and didn't reply me and also for the ppl that just read my post and cuz they don want to do favours for free they just ignored the thread all...



Yours:

Lion
 
Anyway i tried but not working. trust me guyz it's source prob :/



plz plz plz. i need someone that will fix that wether in a post or send me it as a pm or anything that convenience to u guyz. but help me plz. :(




Yours:


Lion
 
Separated it b4 and also didn't work anyway. i found another complete different way to do that. so please need any mod to close that thread. for sure after having 0 useful post to modify the source as i am 100% sure now that it's the prob... Maybe ppl that know about TFS source are busy now? maybe they don like to help anyone? maybe they hate to post or lazy to help or post? i donno really.


CLOSE THIS THREAD



Thanks anyway...



Yours:

Lion
 
Last edited:
Back
Top