local k = getOnlinePlayers()
for i = 1,#k do
local p = getPlayerByName(k[i])
if getPlayerVipDays(p) > 0 then
doPlayerSendTextMessage(p, 20, "YOUR MESSAGE")
end
end
should do itCode:local k = getOnlinePlayers() for i = 1,#k do local p = getPlayerByName(k[i]) if getPlayerVipDays(p) > 0 then doPlayerSendTextMessage(p, 20, "YOUR MESSAGE") end
I like the simplicity of your script!
Absolutely no extra code.
![]()
local p = getPlayerByName(k[i])
The main issue here is that OP is not able to start a valid support thread and therefore did not mention the server version.
+1, lol. I don't think they understand there is a different in functions between server versions.
if the thread creator is unable to define his server version then he'll get a script for the latest server version (TFS1.0)
I am well aware that nearly every svn has its own syntax, i've been with OTs long enough, but well thank you for pointing that out.
@Summ thanks, i wrote that without looking at it again
getOnlinePlayers() still works, why change it to the new syntax?Then you should use: Game.getPlayers()
for _, player in ipairs(Game.getPlayers()) do
if player:getStorageValue(YOUR_STORAGE) > YOUR_VALUE then
player:sendTextMessage(MESSAGE_INFO_DESCR, "Your text")
end
end
for i,k in ipairs(getOnlinePlayers()) do
if getSOMETHING(k) > THIS then
doSomethingWith(k)
end
end