Way20
Well-Known Member
- Joined
- Sep 29, 2014
- Messages
- 205
- Solutions
- 3
- Reaction score
- 79
I have a script with a function OnPush in it, my problem is, it will run the script everytime some player push/move another player and inside the script I have a loop, so Im afraid that it lags the server. Is there a way to check the player storage before it runs the function?
Something like this?
Im very noob with LUA.
Something like this?
Im very noob with LUA.
Lua:
if getPlayerStorageValue(cid, storage) >= 1 then
function onPush(cid, target, ground, position)
Script goes here
return true
end
end