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

storage for char sample

Slepy

New Member
Joined
May 14, 2009
Messages
111
Reaction score
1
who can make script which adds storage in first login to knight sample paladin sample sorcerer and druid sample?
 
Not tested,
Code:
function onLogin(cid)
	local SampleName = {
		 'Knight Sample',
		 'Druid Sample',
		 'Sorcerer Sample',
		 'Paladin Sample',
	}
	if isInArray(SampleName, getCreatureName(cid)) and getPlayerStorageValue(cid, 1234) == -1 then
		setPlayerStorageValue(cid, 1234, 1)
	end
	return true
end
 
whos maked knight and he taked storage 1234 whos maked sorcerer he taked 2345
local ropa =
{
[1] = 1234,
[2] = 2345,
[3] = 3456,
[4] = 4578
}

function onLogin(cid)
local storage = ropa[getPlayerVocation(cid)]
if(not storage) then
return true
end

setPlayerStorageValue(cid, storage, 1)
return true
end

don't work help
 
Add in login.lua
Lua:
function onLogin(cid)
 local permission = {
                         'Sorcerer Sample', 'Druid Sample', 'Knight Sample', 'Paladin Sample',
}
	if isInArray(permission, getCreatureName(cid)) then
			setPlayerStorageValue(cid, 1234, 1)
                        return true
	end
 
Back
Top