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

[SOLVED] function to get if player has on battle, not the battle window

IonS

Master Blaster Noob
Joined
May 14, 2008
Messages
191
Reaction score
0
Location
Brazil
I need a function that returns if player are with battle
battlec.jpg
or not. For example, when player attacks a rat the player get battle
battlec.jpg
, cannot loggout and he is not pzlocked.
I Think that this is possible only by source editing and I do not have knowlege on it.

Can somebody help me with this function?

Thanks in advance and sorry for my english.
 
Last edited:
For example:

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
     if(isPlayerPzLocked ~= TRUE) then
          doPlayerSendTextMessage(cid, 22, "You are PZ Locked, you can't use this")
     else
          --Code
     end
     return TRUE
end
 
I was confused about this function... I have tested the function with your script and now I understood how it works.

Thank you so much!
I don't know how to REP++ but i will try to REP++ you. Thanks again :)

sorry for my english :S

EDIT

REP++ DONE :p
PS: I have learned how to rep++(Kool)!
 
Sorry for re-post but:
Code:
function onSay(cid, words, param, channel)
	if(isPlayerPzLocked ~= TRUE) then
		doPlayerSendTextMessage(cid, 22, "You are PZ Locked.")
	else
		doPlayerSendTextMessage(cid, 22, "You are not PZ Locked.")
	end
	return TRUE
end

and everytime that I send the !pz comand, with or without skull or battle, it returns only "You are PZ Locked.".
Where are my error?

[EDIT]

SOLVED!
Thanks
 
Last edited:
Back
Top