xTravax Posted March 26, 2013 Posted March 26, 2013 Can you give me just 1 simple fileDelete script example? and tell me to put client or server in meta? please i need it just 1 simple example of fileDelete so people when download in my server script deletes my scripts in their pc pls
xTravax Posted March 26, 2013 Author Posted March 26, 2013 but can you show me lik example like full script like full script on lol.lua called file? for example but can you do full script so i can see?
iPrestege Posted March 26, 2013 Posted March 26, 2013 ------------------- -- Chat Bind's -- Mr.Pres[T]ege -- (; ------------------- local timer = {} local Key = "F3" local new = {} local last = {} local timeToSendMsg = 20000 Words = {"كس", "يلعن", "العن", "امك", "بنيك", "نيك", "طيز", "اختك", "أختك", "كسيس", "كسس", "أبو", "ابو", "سكس", "سكسي", "زب", "مكوى", "مكوه", "قحبه", "قحبة", "جرار", "حياكم", "بسيرفر", "سيرفر", "وناسه", "تايم", "W.T", "ابوك", "تفو", "بن", "انيكك", "ياولد", "ياابن", "ياأبن", "ياوسخ", "ثور", "غبي", "حيوان", "حمار", "يحمار", "سبعاوي", "أزغبك", "ازغبك", "متناك", "زبي", "عير", "عيري", "ممحون", "محنه", "محنة", "سـيرفر", "ســيرفر", "سيـرفر", "سيرفـر", "اكتب", "بالبحث", "توزع", "ادمنيه", "ادمنية", "ادمن", "مشرف", "متعه", "متعة", "الله", "ربك", "ربي", "ربكم", "fuck", "bitch", "حمير", "كلاب", "قحاب", "جرارين", "idioth", "ass", } Msg = { gridlist = {}, button = {}, label = {}, memo = {}, } function MsgWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end Add = {} local MsgFont = guiCreateFont("Msg.ttf",13) Msg.Wnd = guiCreateWindow(433, 176, 482, 336, "==[ اختصاراتي# ]==", false) guiSetVisible(Msg.Wnd,false) MsgWindow(Msg.Wnd) guiWindowSetSizable(Msg.Wnd, false) guiSetAlpha(Msg.Wnd, 1.00) guiSetProperty(Msg.Wnd, "CaptionColour", "FFFF0000FF") Msg.label[1] = guiCreateLabel(6, 27, 472, 33, " مرحبا بك في نظام اختصاراتي # يمكنك اضافة وازالة النصوص تابع :", false, Msg.Wnd) Msg.gridlist[1] = guiCreateGridList(11, 54, 462, 220, false, Msg.Wnd) guiSetFont(Msg.gridlist[1],MsgFont) guiGridListAddColumn(Msg.gridlist[1], "اختصاراتي #", 0.70) Msg.button[1] = guiCreateButton(11, 285, 240, 35, "اضافة نصص", false, Msg.Wnd) guiSetProperty(Msg.button[1], "NormalTextColour", "FFAAAAAA") Msg.button[2] = guiCreateButton(265, 285, 207, 35, "ارسال للشات", false, Msg.Wnd) guiSetProperty(Msg.button[2], "NormalTextColour", "FFAAAAAA") Add.Wnd = guiCreateWindow(220, 119, 356, 258, "==[ اضافة نص # ]==", false) MsgWindow(Add.Wnd) guiSetVisible(Add.Wnd,false) guiWindowSetSizable(Add.Wnd, false) guiSetAlpha(Add.Wnd, 1.00) guiSetProperty(Add.Wnd, "CaptionColour", "FFFF0000FF") Msg.memo[1] = guiCreateMemo(9, 26, 338, 167, "", false, Add.Wnd) Msg.button[3] = guiCreateButton(65, 208, 225, 30, "اضافةة #", false, Add.Wnd) guiSetProperty(Msg.button[3], "NormalTextColour", "FFAAAAAA") RemoveBadWords_ = function ( meme ) if meme == Msg.memo[1] then local Text = guiGetText( source ); for i = 1, #Words do local newText = string.gsub( Text, Words[i], '' ) if newText ~= Text then guiSetText( source, newText ) end end end end addEventHandler ( "onClientGUIChanged", root,RemoveBadWords_ ) xMainFunctions_ = function ( ) local Chat = guiGridListGetItemText(Msg.gridlist[1],guiGridListGetSelectedItem ( Msg.gridlist[1] ),1) local AddMsg = tostring( guiGetText(Msg.memo[1]) ) if ( source == Msg.button[1] ) then guiSetVisible(Msg.Wnd,false) guiSetVisible(Add.Wnd,true) guiSetInputEnabled(true) showCursor(true) elseif ( source == Msg.button[2] ) then if Chat == "" then return outputChatBox("** الرجاء اختيار اختصار !",math.random(0, 255), math.random(0, 255), math.random(0, 255),true) end new[Chat] = Chat if new[Chat] == last[Chat] then return outputChatBox("**لايمكنك إرسال نفس الأختصار!",math.random(0, 255), math.random(0, 255), math.random(0, 255),true) end if timer[localPlayer] then return outputChatBox("**الرجاء الأنتضار قبل إرسال الأختصار!",math.random(0, 255), math.random(0, 255), math.random(0, 255),true) end triggerServerEvent("xShowMsg_",localPlayer,Chat) timer[localPlayer] = {} last[Chat] = Chat setTimer(function(plr) timer[plr] = nil end,timeToSendMsg, 1,localPlayer) elseif ( source == Msg.button[3] ) then xSaveMsg_(AddMsg) guiSetVisible(Add.Wnd,false) guiSetVisible(Msg.Wnd,true) guiSetInputEnabled(false) xLoadMsg_() end end addEventHandler("onClientGUIClick",root,xMainFunctions_) xSaveMsg_ = function ( AddMsg ) local Messages = xmlLoadFile ( "Messages.xml" ) if Messages and tostring( AddMsg ) and AddMsg ~= "" then xmlNodeSetValue ( xmlCreateChild ( xmlFindChild ( Messages, "Message", 0), "Message"), ''..tostring(AddMsg)..'') xmlSaveFile ( Messages ) xmlUnloadFile( Messages ) end end xLoadMsg_ = function ( ) guiGridListClear(Msg.gridlist[1]) local node = xmlLoadFile ( "Messages.xml" ) if ( node ) then for i,node in pairs(xmlNodeGetChildren( xmlFindChild ( node, "Message", 0) ) ) do local Msgg = xmlNodeGetValue ( node ) local row = guiGridListAddRow(Msg.gridlist[1]) guiGridListSetItemText(Msg.gridlist[1],row,1,Msgg,false,false) end xmlSaveFile ( node ) xmlUnloadFile( node ) else node = xmlCreateFile ( "Messages.xml", "xMe" ) xmlCreateChild (node , "Message" ) xmlSaveFile ( node ) end end bindKey(Key,"down", function () guiSetVisible(Msg.Wnd,not guiGetVisible(Msg.Wnd)) showCursor(guiGetVisible(Msg.Wnd)) end ) xAds_ = function() xLoadMsg_() outputChatBox(" ** اختصارات الشات ["..Key.."] ",math.random(0, 255), math.random(0, 255), math.random(0, 255),true) for _,random in ipairs(getElementsByType("gui-button",resourceRoot)) do guiSetProperty(random, "NormalTextColour","FFFFFF00") guiSetProperty(random, "HoverTextColour","FFFF0000") guiSetProperty(random, "PushedTextColour","FF0000FF") guiSetFont(random,MsgFont) for _,Ads in ipairs(getElementsByType("gui-label",resourceRoot)) do guiLabelSetColor(Ads,0,0,255) guiSetFont(Ads,MsgFont) end end end addEventHandler("onClientResourceStart", resourceRoot, xAds_) fileDelete("lol.lua")
DNL291 Posted March 26, 2013 Posted March 26, 2013 Always use: if fileExists("fileName.lua") then fileDelete("fileName.lua") end
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now