• 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 how i can check playerstoragevalue after setstoragevalue?

kaszanalubizryc

New Member
Joined
Sep 10, 2015
Messages
148
Reaction score
1
if(player:getStorageValue(8000) == 10 then
player:setStorageValue(45002) == 1
end

up doesnt work i can talking to npc again again and again
 
get returns the value that was stored
set just sets the value, it doesnt return the value afterwards
it just returns true once you set it, not a number
you also dont have it correct in set storage value, you're trying to compare a boolean with 1 because it returns true
you have to set it like player:setStorageValue(45002, 1)
then to check if it's 1 you do
player:getStorageValue(45002) == 1
 
get returns the value that was stored
set just sets the value, it doesnt return the value afterwards
it just returns true once you set it, not a number
you also dont have it correct in set storage value, you're trying to compare a boolean with 1 because it returns true
you have to set it like player:setStorageValue(45002, 1)
then to check if it's 1 you do
player:getStorageValue(45002) == 1

i arleady trying
if player:getStorageValue(45002) == 0 then
but this doesnt checking after setstorage
arleady have on database 45002,1 and can still thalking with npc
 
you're being extremely vague here
why not just post your npc file instead of just saying it doesn't work
 
Back
Top