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

Action Right click ---> remove frags.

in new tfs 0.3 , work namelock manager, and if you click right on id XXXX you get a namelock
 
If you mean getting namelocked when using certain item, then you just need to use:
Code:
doAddNamelock(name[, reason[, action[, comment[, admin]]]])
And you need to kick the player after this, so you need this too:
Code:
doRemoveCreature(cid)

I suppose you want some kind of item to let players change their names whenever they want?
 
@up
I dont think so, he means when you right click on the item your character will be unlocked. And i think this wont work cuz you cant enter your character and right click on it.. so it must be in talkaction or something lik !unlock "charname
 
Can anybody make this in luaSQL for 0.2?

I think its possible.
 
Can anybody make this in luaSQL for 0.2?

I think its possible.

Try:
PHP:
function doPlayerSetRedSkullTicks(cid, val)
	if type(val) ~= 'number' then
		error("luaDoPlayerSetRedSkullTicks: number expected for local 'val' (got " .. type(val) .. ")", 2)
	end
	
	if sqlType == "mysql" then
		local env = assert(luasql.mysql())
		local con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
	else -- sqlite
		local env = assert(luasql.sqlite3())
		local con = assert(env:connect(sqliteDatabase))
	end
	
	assert(con:execute("UPDATE `players` SET `redskullticks` = " .. math.max(val, 0) .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";"))

	con:close()
	env:close()
end

Maybe field name is wrong, tell me if any errors occur... Also in top of your config.lua you need "dofile('config.lua')".
 
Last edited:
So you mean you're getting namelocked when using it?
yep i ask only that would be able to you write something such ;)

He wants the item to namelock you, so it is possible.

And you didn't fixed what I told you on the other forum, change getPlayerRedSkullTicks(cid) to getPlayerFrags(cid) in the doPlayerSendTextMessage function.
 
Last edited:
Try:
PHP:
function doPlayerSetRedSkullTicks(cid, val)
	if type(val) ~= 'number' then
		error("luaDoPlayerSetRedSkullTicks: number expected for local 'val' (got " .. type(val) .. ")", 2)
	end
	
	if sqlType == "mysql" then
		local env = assert(luasql.mysql())
		local con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
	else -- sqlite
		local env = assert(luasql.sqlite3())
		local con = assert(env:connect(sqliteDatabase))
	end
	
	assert(con:execute("UPDATE `players` SET `redskullticks` = " .. math.max(val, 0) .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";"))

	con:close()
	env:close()
end

Maybe field name is wrong, tell me if any errors occur... Also in top of your config.lua you need "dofile('config.lua')".



error..


[30/07/2009 06:37:18] Warning: [Event::checkScript] Event onUse not found. /scripts/quests/doll.lua
 
BUMP :S

can someone find a function for (removeredskullticks)? for tfs 0.2

please

BUMP!
 
Back
Top