Best-Killer
Members-
Posts
494 -
Joined
-
Last visited
Everything posted by Best-Killer
-
I know man -.-
-
the exports setteam work in onPlayerJoin but onRegister not work 0 errors code : function onRegister ( player, username, password, passwordConfirm, s ) if not (username == "") then if not (password == "") then if not (passwordConfirm == "") then if password == passwordConfirm then local account = getAccount (username,password) if (account == false) then exports['NGSQL']:createAccount ( username ); exports['SAEGJobs']:addPlayerToJobDatabase ( source ) exports.SAEGPlayerFunctions:setTeam(source,"Unemployed") local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then setAccountData(accountAdded, "login:secret-answer", tostring(s)) setAccountData(accountAdded, "account:password", tostring(password)) triggerClientEvent ( client, "resetFields", client ) triggerClientEvent ( client, "setWarning", client, "You have registered, so now your final step is to login!", 0, 255, 0 ) triggerClientEvent ( client, "closeRegisterGUI", client ) onLogin (client, username, password ) end else triggerClientEvent ( client, "setRegisterWarning", client, "An Account with this name already exist, use another one!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Passwords aren't the same!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Confirm your password please!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Please enter a password!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Please use a username to register!", 255, 0, 0 ) end end addEvent( "onRegister", true ) addEventHandler( "onRegister", getRootElement(), onRegister ) addEventHandler('onPlayerLogin', root, function() triggerClientEvent ( source, "hideLoginWindow", source ) end ) addEventHandler("onPlayerLogout", root, function() triggerClientEvent( source, "showLogin", source ) end ) addEventHandler ( "onPlayerJoin", root, function ( ) setElementData ( source, "Job", "None" ) setElementData ( source, "Job Rank", "None" ) setElementData ( source, "Gang", "None" ) setElementData ( source, "Gang Rank", "None" ) setElementData ( source, "Money", "$0" ) setElementData ( source, "Playtime", "0 m" ) setElementData ( source, "FPS", "0" ) exports.SAEGPlayerFunctions:setTeam(source,"Not Logged In") end )
-
What is the Error showing in debugscript 3 ??
-
Same Problem pls try to fix it pls getelmentdate expected element at argument 1 got nill
-
table index nill
-
Ik Bro i used /infohelp and after infohelp i used /spam but spam showing to me : You are not allowed to use this | Type /infohelp
-
Not work Worked But when i use /infohelp then /spam or /insult or anything it's showing to me : You are not allowed to use this | Type /infohelp
-
attemt to call global addcommandhandler ' (a nill value )
-
Table index nil
-
bad argument @'addcommandhandler' expected function at argument 2 , got nil
-
not work ERROR: Testinginfos/client.lua:15: attempt toindex local 'localplayerinfos(a nil value)
-
Thanks You But Bro i want players can not use the commands without using /infohelp first
-
example (script) ./infohelp , after that command showing a message in topbar : /spam /insult /caps ,, after that the play can use spam or insult or caps ..... when use /spam it's showing message mainchat to all player Infos: Stop Spamming .......... ect
-
Hey Guys , can anyone give me examples for make script (infos) example (script) ./infohelp , after that command showing a message in topbar : /spam /insult /caps ,, after that the play can use spam or insult or caps ..... when use /spam it's showing message mainchat to all player Infos: Stop Spamming .......... ect please help me
-
Problem is here ? Guys Help me pleaes
-
So How i can fix it
-
ERROR : SAEGfastfood/food_c.lua:25:attempt to index field '?4 (A nill Value ) code : -- Define the menu GUI window local sx,sy = guiGetScreenSize() local win_menu = guiCreateWindow((sx-320)/2, (sy-297)/2, 320, 297, "Restaurant menu", false) guiSetVisible(win_menu, false) -- Define the menu buttons btn_close = guiCreateButton(210,257,100,36,"Close",false,win_menu) btn_choice_1 = guiCreateButton(10,100,160,36, "Buster("..prices[1].."$)",false,win_menu) btn_choice_2 = guiCreateButton(10,217,160,36, "Double D-Luxe("..prices[2].."$)",false,win_menu) btn_choice_3 = guiCreateButton(170,100,160,36, "Full rack("..prices[3].."$)",false,win_menu) btn_choice_4 = guiCreateButton(170,217,160,36, "Sallad meal("..prices[4].."$)",false,win_menu) -- Apply SAEGGui styles exports.SAEGGui:setDefaultFont(btn_close, 10) exports.SAEGGui:setDefaultFont(btn_choice_1, 10) exports.SAEGGui:setDefaultFont(btn_choice_2, 10) exports.SAEGGui:setDefaultFont(btn_choice_3, 10) exports.SAEGGui:setDefaultFont(btn_choice_4, 10) --[[ Update the GUI depending on restaurant type ]]-- function initialize_menu_choices(r_type) -- Set the text and prices on buttons and window title guiSetText(win_menu, menu_choices[r_type]["title"]) guiSetText(btn_choice_1, menu_choices[r_type]["choice_1"][1]..", "..prices[1].."$") guiSetText(btn_choice_2, menu_choices[r_type]["choice_2"][1]..", "..prices[2].."$)") guiSetText(btn_choice_3, menu_choices[r_type]["choice_3"][1]..", "..prices[3].."$)") guiSetText(btn_choice_4, menu_choices[r_type]["choice_4"][1]..", "..prices[4].."$)") -- Destroy current images if any if img1 and isElement(img1) then destroyElement(img1) end if img2 and isElement(img2) then destroyElement(img2) end if img3 and isElement(img3) then destroyElement(img3) end if img4 and isElement(img4) then destroyElement(img4) end -- Make new images, (load from files when needed) img1 = guiCreateStaticImage(10, 23, 160, 77, menu_choices[r_type]["choice_1"][2], false, win_menu) img2 = guiCreateStaticImage(10,140, 160, 77, menu_choices[r_type]["choice_2"][2], false, win_menu) img3 = guiCreateStaticImage(170, 23, 160, 77, menu_choices[r_type]["choice_3"][2], false, win_menu) img4 = guiCreateStaticImage(170, 140, 160, 77, menu_choices[r_type]["choice_4"][2], false, win_menu) end --[[ Open the menu GUI to choose food ]]-- function open_menu(plr, r_type) initialize_menu_choices(r_type) guiSetVisible(win_menu, true) showCursor(true) end addEvent("SAEGfastfood.gui.show",true) addEventHandler("SAEGfastfood.gui.show", root, open_menu) --[[ Close the menu ]]-- function close_menu() guiSetVisible(win_menu, false) showCursor(false) end addEvent("SAEGfastfood.gui.hide", true) addEventHandler("SAEGfastfood.gui.hide", root, close_menu) --[[ Handle menu click ]]-- function menu_click() -- Make sure that the player can afford his food local money = getPlayerMoney(localPlayer) -- Shall we close this menu? if source == btn_close then guiSetVisible(win_menu, false) showCursor(false) return end -- Alright, let's continue shopping, can I take your order? local ID_choice = 1 if source == btn_choice_1 then ID_choice = 1 end if source == btn_choice_2 then ID_choice = 2 end if source == btn_choice_3 then ID_choice = 3 end if source == btn_choice_4 then ID_choice = 4 end -- Take care of the order server side if money > prices[ID_choice] and not isTimer(cooldown) then triggerServerEvent("SAEGfastfood.buy", localPlayer, prices[ID_choice], health[ID_choice]) cooldown = setTimer(function() end, 200, 1) end end addEventHandler("onClientGUIClick", btn_close, menu_click) addEventHandler("onClientGUIClick", btn_choice_1, menu_click) addEventHandler("onClientGUIClick", btn_choice_2, menu_click) addEventHandler("onClientGUIClick", btn_choice_3, menu_click) addEventHandler("onClientGUIClick", btn_choice_4, menu_click) --[[ Protect fastfood workers from being killed ]]-- function protect_worker(attacker) if not getElementData(source, "SAEGfastfood.isWorker") then return end cancelEvent() -- cancel any damage done to peds end addEventHandler("onClientPedWasted", root, protect_worker)
-
MTA:BLUE Server for MTA:SA [17:22:09] ERROR: Could not start HTTP server on interface '' and port '22003'! [17:22:09] Server stopped! Press Q to shut down the server! Mtaserver.conf SAEG RPG|1.0 Beta|Cops 'nRobbers, Civilians, SWAT, Military,and much more 22003 350 1 22003 5 20 1 1.5.0-9.07486 1 1 0 medium 100 1500 500 400 400 100 100 1 0 150 0 server-id.keys logs/server.log logs/server_auth.log logs/db.log acl.xml logs/scripts.log 0 0 50 0 0 1 4 backups 3 5 1
