Hi im trying to make a script that checks on login if the player have acces > 0, if so it checks the name of the admin and if it is one of them the script allows him to enter to the server, if no, the player will be kicked, set acces to 0 and also ban him
i have this: but idk whats wrong with it... for now instead of kicking player its checks if it is in the admin lists or no.. but when i try to login, i get no error but in the server console says: [8:51:20.716] Alberto has logged in.
[8:51:20.727] Alberto has logged out.
thanks
i have this: but idk whats wrong with it... for now instead of kicking player its checks if it is in the admin lists or no.. but when i try to login, i get no error but in the server console says: [8:51:20.716] Alberto has logged in.
[8:51:20.727] Alberto has logged out.
Code:
function onLogin(cid)
name = getPlayerName(cid)
if getPlayerAccess(cid) > 0 then
if (getCreatureName(cid) == "Alberto") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "admin")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "wrong admin")
end
end
end