yolfran
Mapper-Chibcha
I have a question,
.
How can i remove a StorageValue or change for other
I need for mi VIP system ,I have a storage value and when the vip ends I want change the value or remove it,but I dont know.
I was trying something like this:
onlogin,I have the funcition Isvip in the lib ,and the code in creaturescripts,but i cant change the storage.
.
How can i remove a StorageValue or change for other
I need for mi VIP system ,I have a storage value and when the vip ends I want change the value or remove it,but I dont know.
I was trying something like this:
PHP:
function onLogin(cid)
local premStorage = 35966
if isVip(cid) == TRUE and getPlayerStorageValue(cid,premStorage)== -1 then
setPlayerStorageValue(cid, premStorage, 1)
elseif isVip(cid) == FALSE and getPlayerStorageValue(cid, premStorage) == 1 then
setPlayerStorageValue(cid, premStorage, -1)
elseif isVip(cid) == FALSE and getPlayerStorageValue(cid, premStorage) == 1 and getPlayerVocation(cid) > 4 then
doPlayerSetVocation(cid, getPlayerVocation(cid) -4)
end
return TRUE
end
onlogin,I have the funcition Isvip in the lib ,and the code in creaturescripts,but i cant change the storage.