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

[TalkActions] TFSbeta2

Marcinek123

Badboy
Joined
Jan 21, 2008
Messages
49
Reaction score
0
Location
Poland
Hello I need help... i have today bad day... i cannot think...:confused:

Please somebody fixt it...
HTML:
function onSay(cid, item, words)
	local storages ={
	storageKruzbb = 3331,
	storageDarkcamp = 3332,
	storageForest = 3333}
	local text = ""
	local status1 = ""
	local status2 = ""
	local status3 = ""
	--tmp = getPlayerPosition(cid)
	
	if getPlayerStorageValue(getPlayerPosition(cid), storageKruzbb) == 1 then
	status1 = ACTIVE	
	else
	status1 = NOT ACTIVE
	end
	
	if getPlayerStorageValue(getPlayerPosition(cid), storageDarkcamp) == 1 then
	status2 = ACTIVE	
	else
	status2 = NOT ACTIVE
	end
	
	if getPlayerStorageValue(getPlayerPosition(cid), storageForest) == 1 then
	status3 = ACTIVE	
	else
	status3 = NOT ACTIVE
	end
	
	line1 = "Portal in Kruzbb is" .. status1 .. "\n"
	line2 = "Portal in Darkcamp is" .. status2 .. "\n"
	line3 = "Portal in Forest is" .. status3 .. "\n"
	text = .. line1 .. .. line2 .. .. line3 ..

	doShowTextDialog(getPlayerPosition(cid), , text)
	return TRUE
end
 
Havent even tried to optimize it...
Code:
function onSay(cid, item, words)
	local storages = {
		storageKruzbb = 3331,
		storageDarkcamp = 3332,
		storageForest = 3333
	}
	local text = ""
	local status1 = ""
	local status2 = ""
	local status3 = ""
	--tmp = getPlayerPosition(cid)
	
	if getPlayerStorageValue(cid, storages.storageKruzbb) == 1 then
		status1 = "ACTIVE"	
	else
		status1 = "NOT ACTIVE"
	end
	
	if getPlayerStorageValue(cid, storages.storageDarkcamp) == 1 then
		status2 = "ACTIVE"	
	else
		status2 = "NOT ACTIVE"
	end
	
	if getPlayerStorageValue(cid, storages.storageForest) == 1 then
		status3 = "ACTIVE"
	else
		status3 = "NOT ACTIVE"
	end

	text = "Portal in Kruzbb is "..status1.."\nPortal in Darkcamp is "..status2.."\nPortal in Forest is "..status3.."."
	text = .. line1 .. .. line2 .. .. line3 ..
	doShowTextDialog(cid, 1949, text)
	return TRUE
end
 
Back
Top