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

[onLogin] Simply script dont work

Inteligentny

Im not.
Joined
Aug 2, 2008
Messages
485
Reaction score
0
yop, I dont know why its not working, when I try login, server is kicking me.

Code:
function onLogin(cid)
local level = getPlayerLevel(cid) 
	if level >= 1 and level <= 20 and getPlayerStorageValue(cid, 10122) == -1 then
	    			setPlayerStorageValue(cid, 10122, 1) 
  	elseif level >= 21 and level <= 50 and getPlayerStorageValue(cid, 10122) == -1 then 
	    		     
	    			doPlayerAddItem(cid,2160, 5) 
	    			setPlayerStorageValue(cid, 10122, 1) 
	    		elseif level >= 51 and level <= 100 and getPlayerStorageValue(cid, 10122) == -1 then 
	    		      
	    			doPlayerAddItem(cid,2160, 10) 
	    			setPlayerStorageValue(cid, 10122, 1) layerStorageValue(cid, 10122, 1)
	    		elseif level >= 101 and level <= 150 and getPlayerStorageValue(cid, 10122) == -1 then 
				    	   
				    	doPlayerAddItem(cid,2160, 15) 
	    				setPlayerStorageValue(cid, 10122, 1) 
	    		elseif level >= 150  and getPlayerStorageValue(cid, 10122) == -1 then 
	   			    
					doPlayerAddItem(cid,2160, 15) 
	   			 	setPlayerStorageValue(cid, 10122, 1) 
	    
		end
end
 
PHP:
setPlayerStorageValue(cid, 10122, 1) layerStorageValue(cid, 10122, 1)
wtf? what's that? xD also you should add registerCreatureEvent(cid, "PlayerDeath") before return (look @up).
 
Last edited:
Back
Top