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

see frags

miros

New Member
Joined
Oct 3, 2010
Messages
18
Reaction score
0


Man please help me with script like this "frags on click player"
and if player will have 20 frags -white skull
30 frags - yellow skull
40 frags - red skull
50 frags - black skull
 
Lua:
function onLogin(cid)
registerCreatureEvent(cid, "FragsL")
end
function onLook(cid, thing, position, lookDistance)
if getCreatureName(thing.uid) == getCreatureName(cid) then
 doPlayerSetSpecialDescription(thing.uid, "You have ".. getPlayerFrags(cid) .." frags.")
end
return true
end

Now on creaturescripts.xml this:
XML:
<event type="login" name="fragsL_register" event="script" value="seefrags.lua"/>
<event type="look" name="FragsL" event="script" value="seefrags.lua"/>

;)
 
Last edited:
why this check remove it , this wont differ as on looking on your self as bogart said it needs source :p as for the skulls it dont requirs source
Code:
if getCreatureName(thing.uid) == getCreatureName(cid) then
 
Here

Lua:
function onLook(cid, thing, position, lookDistance)
	if isPlayer(thing.uid) then
		return doPlayerSetSpecialDescription(thing.uid, ". \n Frags: "..(getPlayerStorageValue(thing.uid, 20233) < 1 and 0 or getPlayerStorageValue(thing.uid, 20233)).."")
	end
end
XML
XML:
<event type="look" name="lookFrags" event="script" value="lookfrags.lua"/>

Login.lua
Lua:
registerCreatureEvent(cid, "lookFrags")
 
Last edited:
HMMM
if getCreatureName(thing.uid) == getCreatureName(cid) then
Works clicking yourself and for other players not work. .. read the comparation please. :>
 
Kyler :
You know what your script do?

1- Player look on yohu and he see no frags

2 - For a player see how many frags you have you have too look on your self first

3- And when you look on your self you yourself will not find any special description , only player who will look at you will see your frags

Conclusion :

Code:
if getCreatureName(thing.uid) == getCreatureName(cid) then

Fail....
 
Back
Top