• 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 God Skull

luigilc

Lua Learner
Joined
Mar 24, 2010
Messages
863
Reaction score
36
Location
A music box
I need help making a creaturescript that makes gods have a yellow skull, I tried doing:
Lua:
function onLogin(cid)
         if getPlayerGroupName(cid, God)
         then
                doPlayerSetSkullType(cid, SKULL_WHITE)
         end
         return true
end

but it returns this error:
Lua:
[27/08/2011 17:10:04] [Error - CreatureScript Interface] 
[27/08/2011 17:10:04] data/creaturescripts/scripts/god skull.lua:onLogin
[27/08/2011 17:10:04] Description: 
[27/08/2011 17:10:04] data/creaturescripts/scripts/god skull.lua:5: attempt to call global 'doPlayerSetSkullType' (a nil value)
[27/08/2011 17:10:04] stack traceback:
[27/08/2011 17:10:04] 	data/creaturescripts/scripts/god skull.lua:5: in function <data/creaturescripts/scripts/god skull.lua:2>

I also tried:
Lua:
     doPlayerSetSkullType(cid, SKULL_YELLOW)
           doPlayerSetSkull(cid, SKULL_YELLOW)
           doPlayerSetSkullType(cid, 1)
           doPlayerSetSkull(cid, 1)
           doCreatureSetSkullType(cid, 1)
           doCreatureSetSkullType(cid, SKULL_YELLOW)
But none worked, can anyone help me?
 
Lua:
 	doCreatureSetSkullType(cid, skull)
I think that's the one you want.
Also change the
Lua:
         if getPlayerGroupName(cid, God)
         then
to
Lua:
if (getPlayerAccess(cid) == 6) then
 
it's not working. No errors in console but when I log in with god I don't have any skull.
Lua:
function onLogin(cid)
	if (getPlayerAccess(cid) ==6)
         then
 	doCreatureSetSkullType(cid, SKULL_WHITE)
         end
         return true
end
also tried:
Lua:
 	doCreatureSetSkullType(cid, 1)
 
Lua:
function onLogin(cid)
if getPlayerGroupId(cid) == 6 then
doPlayerSetSkullType(cid, 5)
end
return TRUE
end
 
Last edited:
Lua:
function onLogin(cid)
if getPlayerGroupId == 6 then
doPlayerSetSkullType(cid, 5)
end
return TRUE
end
No errors in console and Gods still don't get skull when login.
Registered on login.lua and creaturescripts.xml
 
Lua:
function onLogin(cid)
if getPlayerGroupId == 6 then
doPlayerSetSkullType(cid, 5)
end
return TRUE
end

Panda is just playing with us.
Lua:
function onLogin(cid)
if getPlayerGroupId(cid) == 6 then
doPlayerSetSkullType(cid, 5)
end
return TRUE
end
 
When I use Santi's code I get this error in console:
Lua:
[27/08/2011 22:38:04] [Error - CreatureScript Interface] 
[27/08/2011 22:38:04] data/creaturescripts/scripts/god skull.lua:onLogin
[27/08/2011 22:38:04] Description: 
[27/08/2011 22:38:04] data/creaturescripts/scripts/god skull.lua:3: attempt to call global 'doPlayerSetSkullType' (a nil value)
[27/08/2011 22:38:04] stack traceback:
[27/08/2011 22:38:04] 	data/creaturescripts/scripts/god skull.lua:3: in function <data/creaturescripts/scripts/god skull.lua:1>
 
When I use Santi's code I get this error in console:
Lua:
[27/08/2011 22:38:04] [Error - CreatureScript Interface] 
[27/08/2011 22:38:04] data/creaturescripts/scripts/god skull.lua:onLogin
[27/08/2011 22:38:04] Description: 
[27/08/2011 22:38:04] data/creaturescripts/scripts/god skull.lua:3: attempt to call global 'doPlayerSetSkullType' (a nil value)
[27/08/2011 22:38:04] stack traceback:
[27/08/2011 22:38:04] 	data/creaturescripts/scripts/god skull.lua:3: in function <data/creaturescripts/scripts/god skull.lua:1>

when I used your code you're using I dont get errors.......
 
Back
Top