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

Lua Help to make code rep++

Racktor

New Member
Joined
Sep 19, 2009
Messages
3
Reaction score
0
Hello otland i want make a simple talkaction

i want to make this player->useTalkaction->createTextfilewiththecode&name->savefile infolder->giveStorage

example: !code 12345678910, Playername


any can help me i just start this script but im new in lua




Lua:
 function onSay(cid, words, param)

local param = param.explode(param, ',')
 local code = {param[1], param[2], param[3], param[4]}
	  local name = param[5]
	for i=1, #code do
	if getPlayerStorageValue(cid, 12000) == FALSE then
	if param == '' and (words == '" .. code .. "') then
		-- createFileAndSaveInFolder() -> how i can create function to save code in txt file?						
doPlayerSendTextMessage(cid, 22, "Succesfull Send")
setPlayerStorageValue(cid, 12000, 1)															
else
doPlayerSendTextMessage(cid, 14, "Already Sent")
else
doPlayerSendTextMessage(cid, 14, "Code dont Exist")
 end
							                                           
  return TRUE
 end
 

Similar threads

Back
Top