antoniolagos
Member
- Joined
- Apr 10, 2010
- Messages
- 34
- Reaction score
- 6
Hello, Im working in a script that don´t allow a player with a storage value attack a player with the same storage value. This is ok and working, but only allows 1 storage value:
But now I need the same but add an extra storage value to have the same effect. I did this but this is not working:
Please help me fix the second script, because the first one is working okay but i need to add an extra player storage value and the second i did not Okay. What is the error in the second script?
Code:
local storage = 323245
function onCombat(cid, target)
if getPlayerStorageValue(cid, storage) ~= -1 then
if getPlayerStorageValue(cid, storage) == getPlayerStorageValue(target, storage) then
return false
end
end
return true
end
But now I need the same but add an extra storage value to have the same effect. I did this but this is not working:
Code:
local storage = 323245
local storage2 = 323244
function onCombat(cid, target)
if getPlayerStorageValue(cid, storage) ~= -1 then
if getPlayerStorageValue(cid, storage) == getPlayerStorageValue(target, storage) then
return false
else
if getPlayerStorageValue(cid, storage2) ~= -1 then
if getPlayerStorageValue(cid, storage2) == getPlayerStorageValue(target, storage2) then
return false
end
end
end
end
return true
end
Please help me fix the second script, because the first one is working okay but i need to add an extra player storage value and the second i did not Okay. What is the error in the second script?
Last edited: