Onizuka
Member
- Joined
- Jul 5, 2008
- Messages
- 2,291
- Reaction score
- 14
Code:
local welcome = {
ON = true,
Access = 0,
Nr_text = MESSAGE_INFO_DESCR,
Nr_text_2 = MESSAGE_EVENT_ORANGE,
Storage = 9928
}
local Login_number = true
function onLogin(cid)
local names = getCreatureName(cid)
local welcome_2 = {
[0] = "Welcome my friend "..names,
[1] = "I greet you "..names..". My Lord !",
[2] = "Reminding you about server rules, Do not cheat "..names
}
if welcome.ON == true then
local sex = getPlayerSex(cid)
local char_storage = getPlayerStorageValue(cid, welcome.Storage)
if char_storage == -1 then
doPlayerSetStorageValue(cid, welcome.Storage, 1)
else
char_storage = char_storage + 1
doPlayerSetStorageValue(cid, welcome.Storage, char_storage)
end
if getPlayerAccess(cid) <= welcome.Access then
doPlayerSendTextMessage(cid, welcome.Nr_text, welcome_2[sex])
if Login_number == true then
doPlayerSendTextMessage(cid, welcome.Nr_text_2, "This is you "..char_storage.." login")
end
end
I added it to creaturescripts but it crashes the server when trying to log in.
Error:
Code:
To Close 'if' at line 16. '<eof>'
Any ideas.?
Regards,
Anco.