• 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!

Powazny problem z serwerm

rzeczywicie ;) dziala elegancko wielkie dzieki

Teraz do kazdego skryptu wystarczy dodac ?

tak, oczywiście, jeżeli chcesz, aby każdy skrypt miał oddzielny exhaust (bo ja to robie na wszystkie skrypty 1, czyli obojętnie jakiej komendy się użyje to następnej można za 10 sekund) to zmieniasz ten numerek 12321 na inny, jest to storage value, które trzyma czas exhausta :)
 
Nie czaje troche

Mozna zrobic tak zeby nie dodawac do kazdeo skryptu osobno tylko dziala od razu na wszystkie talkactions ?
 
Da sie jeszcze cos zrobic z tym szybkim kupowaniem u npc ?
 
Stary tfs ma bardzo wiele luk które można łatwo wykorzystać, a ty załatwiłeś 1 ze 100. Na pewno nie załatasz wszystkiego sam, ale też na pewno nikt nie da Ci za darmo wszystkiego. To o co pytasz jest już na forum od dawna tylko użyj funkcji szukania.
 
online.lua
Lua:
local waittime = 30 --Default (30 seconds)
local storage = 5564

local config = {
	showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand'))
}
 
function onSay(cid, words, param, channel)

        if exhaustion.get(cid, storage) == FALSE then
                exhaustion.set(cid, storage, waittime)
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have to wait " .. exhaustion.get(cid, storage) .. " seconds.") 
        return true
       end 

	local players = getPlayersOnline()
	local strings = {""}
local sorc,druid,paladin,knight,rook = 0,0,0,0,0
 
	local i, position = 1, 1
	local added = false
	for _, pid in ipairs(players) do
	-- Implementacion por Xafterin.
		if isSorcerer(pid) then
			sorc = sorc + 1
		elseif isDruid(pid) then
			druid = druid + 1
		elseif isPaladin(pid) then
			paladin = paladin + 1
		elseif isKnight(pid) then
			knight = knight + 1
		elseif isRookie(pid) then
			rook = rook + 1
	end
	---
		if(added) then
			if(i > (position * 7)) then
				strings[position] = strings[position] .. ","
				position = position + 1
				strings[position] = ""
			else
				strings[position] = i == 1 and "" or strings[position] .. ", "
			end
		end
 
		if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then
			strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]"
			i = i + 1
			added = true
		else
			added = false
		end
	end
 
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player(s) online:")
	for i, str in ipairs(strings) do
		if(str:sub(str:len()) ~= ",") then
			str = str .. ". ".. sorc .." sorcerers, ".. druid .." druids, ".. paladin .." paladins, ".. knight .." knights and ".. rook .." rookies."
		end
 
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str)
	end
 
	return true
end

czyli na początku trzeba dodać
Lua:
local waittime = 30 --Default (30 seconds)
local storage = 5564

i po function onSay
Lua:
        if exhaustion.get(cid, storage) == FALSE then
                exhaustion.set(cid, storage, waittime)
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have to wait " .. exhaustion.get(cid, storage) .. " seconds.") 
        return true
       end

i bez bezsensownego pieprzenia się w jakieś liby
 
Last edited:
#up
widze idiota mode online u ciebie - 0 najmniejszej wiedzy, aż szkoda, że ty masz serwer. ;/
Bez zabawy w liby, a dałeś mu skrypt który wymaga tego liba, idioto.

dobrze azi, dissuj go, do piachu z nim!


# triamera~~
chodziło Ci zapewne, żeby typek kupił Twoje fixy?;d ponoć miałeś sporo ich, ale dość wysoka cena była

# temat
tak jak napisali inni, poszukaj po tematach, bo na polish boardzie było sporo nawet tych różnych zagadnień o fixy
 
Nie, nie o to mi chodziło, co do fixów to już ich nie sprzedaje, co najwyżej rozważam propocyje współpracy.
 
Back
Top