Jump to content

bandi94

Members
  • Posts

    1,037
  • Joined

  • Last visited

Everything posted by bandi94

  1. i make a next map buy system now i search the server side funtion what get trigget when you pres's set next map on admin panel : triggerServerEvent("setNextMap_s", getLocalPlayer(), nev) now when i trigger this whit admin account its working but when a normal player buy a next map it get Warning admin/server/admin_server.lua:1424: Admin security - Client whitout admin panel rights trigged an admin panel event. ...(ip).. now how can i disable the admin security for that "setNextMap_s" event or set next map function ( if it is posible only for setNextMap for another function's to be enabled ) thx for helping
  2. function onJoin(player) local team =getTeamFromName("Guests") setPlayerTeam(player, team) end addEventHandler("onPlayerJoin", getRootElement(), onJoin)
  3. i am stuck whit send map names from server to client server function maps() gamemodes = call(getResourceFromName("mapmanager"), "getRunningGamemode") local maps = call(getResourceFromName("mapmanager"), "getMapsCompatibleWithGamemode",gamemodes ) local name={} for i,v in pairs(maps) do neve= getResourceInfo(v, "name") or getResourceName(v) name[i]=neve end triggerClientEvent(source,"mapok",source,name) end client local mapok function list(maps) mapok = maps guiGridListClear(List) for i,m in pairs (mapok) do local row= guiGridListAddRow ( List ) local neve=m[i] guiGridListSetItemText ( List, row, column,neve, false, false) end end i get argument 4 get nil on guiGridListSetItemText on the server side the tabel is ok i tryed whit outputChatBox the problem is whit sendig it to client thx for helping
  4. "vehicle_fire" is not a key check here the key names: https://wiki.multitheftauto.com/wiki/Key_names
  5. setPlayerTeam(player,nil) remove a player from a team or you can edit that resource to check something befor set the player team
  6. you need to put the script in \MTA San Andreas 1.1\server\mods\deathmatch\resources search vehicle mods on community or try to make yourself
  7. that resource is not working in 1.1 use this https://community.multitheftauto.com/index.php?p= ... ls&id=2833 is my autoteam you will find info in readme file and on comment's
  8. CapY see your job and don't post unnecessary msg you can only (hmm this is not working can you give me the full code and unnecessary msg so ...)
  9. ha nem vetted eszre a mtasa = Multi Theft Auto San Andreas nem GTA 3 nem fog senki valaszolni hogy ha en egy eteles boltban TV-t kerek ....
  10. the script won't start by himself exports.scoreboard:addScoreboardColumn('Country') function addCountryScore () local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) setElementData(source,"Country",flag) end addEventHandler("onPlayerJoin",getRootElement(),addCountryScore)
  11. hello the admin panel use this to send message from /report window to admin panel local tableOut = {} tableOut.category = guiGetText ( aReportCategory ) tableOut.subject = guiGetText ( aReportSubject ) tableOut.message = guiGetText ( aReportMessage ) triggerServerEvent ( "aMessage", getLocalPlayer(), "new", tableOut ) now i make a new panel whit more function's now it is possible that from my resource to triggerServerEvent "aMessage" from admin resource ( client side trigger a server event in another resource ) (to don't put my resource in admin panel script 0 ) thx
  12. Thx very much BinSlayer1 and Aibo its working whit false in the handler
  13. local auuser local aupass local autologin =0 local ena=0 local window = guiCreateWindow(0.25,0.25,0.5,0.55,"|DGT| Clan Server",true) local tab = guiCreateTabPanel(0,0.05,1,0.85,true,window) local loginregister = guiCreateTab("Login/Register",tab) local rules = guiCreateTab("Rules",tab) local News = guiCreateTab("New,s",tab) local info = guiCreateTab("Info's",tab) local teamask = guiCreateTab("Team ask",tab) local tgf = guiCreateTab("TGF",tab) showCursor(true) ------------login/register------------------- local ussertxt = guiCreateLabel (0.1,0.3,1,1,"Ussername :",true, loginregister) local passtxt = guiCreateLabel (0.1,0.5,1,1,"Passworld :",true, loginregister) local ussername = guiCreateEdit(0.25,0.29,0.2,0.07,"",true, loginregister) local passworld = guiCreateEdit(0.25,0.49,0.2,0.07,"",true, loginregister) local loginb = guiCreateButton ( 0.1, 0.8, 0.15, 0.15, "Login", true, loginregister ) local registerb = guiCreateButton ( 0.4, 0.8, 0.15, 0.15, "Register", true, loginregister ) local guest = guiCreateButton ( 0.7, 0.8, 0.16, 0.15, "Play as Guest", true, loginregister ) local enableauto = guiCreateButton ( 0.7, 0.3, 0.15, 0.15, "Enable ", true, loginregister ) local disableauto = guiCreateButton ( 0.7, 0.5, 0.15, 0.15, "Disable ", true, loginregister ) local result = guiCreateWindow ( 0.4, 0.5, 0.3, 0.15, "Information", true ) local close= guiCreateButton ( 0.4, 0.95, 0.15, 0.15, "Close ", true,window) local resultb= guiCreateButton ( 0.4, 0.7, 0.15, 0.15, "OK ", true,result) local resulttxt=guiCreateLabel (0.1,0.4,1,1,"",true, result) guiSetProperty (ussername, "AlwaysOnTop", "true" ) guiSetProperty (passworld, "AlwaysOnTop", "true" ) guiSetProperty (guest, "AlwaysOnTop", "true" ) guiSetProperty (enableauto, "AlwaysOnTop", "true" ) guiSetProperty (disableauto, "AlwaysOnTop", "true" ) guiSetProperty (loginb, "AlwaysOnTop", "true" ) guiSetProperty (registerb, "AlwaysOnTop", "true" ) guiSetVisible (result,false) guiSetProperty (result, "AlwaysOnTop", "true" ) guiSetProperty (resultb, "AlwaysOnTop", "true" ) guiWindowSetSizable(window,false) guiWindowSetMovable(window,false) guiSetProperty (close, "AlwaysOnTop", "true" ) ------------------Rules------------------------------------ local r = guiCreateMemo(0.05,0.05,0.9,0.9,"",true,rules) guiMemoSetReadOnly(r,true) --------------------New's------------------------------------- local n= guiCreateMemo(0.05,0.05,0.9,0.9,"",true,News) guiMemoSetReadOnly(n,true) ------------------Info's-------------------------------------- local i = guiCreateMemo(0.05,0.05,0.9,0.9,"",true,info) guiMemoSetReadOnly(i,true) ------------Team ask ------------------------------------------ local name = guiCreateEdit(0.25,0.192,0.25,0.07,"",true, teamask) local tag = guiCreateEdit(0.25,0.292,0.25,0.07,"",true, teamask) local color = guiCreateEdit(0.38,0.392,0.25,0.07,"",true, teamask) local oldname = guiCreateEdit(0.3,0.492,0.25,0.07,"",true, teamask) local newname = guiCreateEdit(0.32,0.592,0.25,0.07,"",true, teamask) local newtag = guiCreateEdit(0.3,0.692,0.25,0.07,"",true, teamask) local newcolor = guiCreateEdit(0.43,0.792,0.25,0.07,"",true, teamask) local askrule = guiCreateLabel (0.03,0.03,1,1,"If you use this system for Insulting or Spam you will be banned from this system ! ",true, teamask) local nametxt = guiCreateLabel (0.1,0.2,1,1,"Team Name :",true,teamask) local tagtxt = guiCreateLabel (0.1,0.3,1,1,"Team Tag :",true, teamask) local colortxt = guiCreateLabel (0.1,0.4,1,1,"Team Color Code (hex) :",true, teamask) local oldnametxt = guiCreateLabel (0.1,0.5,1,1,"Team old Name :",true, teamask) local newnametxt = guiCreateLabel (0.1,0.6,1,1,"Team new name :",true, teamask) local newtagtxt = guiCreateLabel (0.1,0.7,1,1,"Team new Tag :",true, teamask) local newcolortxt = guiCreateLabel (0.1,0.8,1,1,"Team new Color code (hex):",true, teamask) local newteam = guiCreateCheckBox ( 0.8, 0.3, 0.3, 0.1, "New Team", false, true, teamask) local modification = guiCreateCheckBox ( 0.8, 0.5, 0.3, 0.1, "Modification", false, true, teamask ) local send = guiCreateButton ( 0.8, 0.8, 0.15, 0.15, "Send", true, teamask ) -------------TGF--------------- local tgfb = guiCreateButton ( 0.4, 0.7, 0.16, 0.15, "Jelentkezem!", true, tgf) local tgfinfo = guiCreateMemo(0.01,0.01,0.99,0.3,"",true,tgf) local tgfszam = guiCreateLabel (0.4,0.5,1,1,"TGF hely :",true, tgf) -----------------Login script--------------------------------- function sendLogin() local usser = guiGetText(ussername) local pass = guiGetText(passworld) triggerServerEvent("login",getLocalPlayer(),usser,pass) outputChatBox("ok") end addEventHandler ( "onClientGUIClick", loginb, sendLogin ) function resultLogin(msg) guiSetText(resulttxt,msg) guiSetVisible(result,true) end addEvent("loginresult",true) addEventHandler("loginresult",getRootElement(),resultLogin) this is the Login button and login function part now i tested and if i click ex on the loginregister tab panel it out put chat box "ok"(like if i clicked on the buton but i don't cilck on the button )
  14. i say its only a par the full code is like 200 line i will not post the whole code ... the handler's are after each function like function sendLogin() local usser = guiGetText(username) local pass = guiGetText(password) triggerServerEvent("login",getLocalPlayer(),usser,pass) end addEventHandler ( "onClientGUIClick", loginb, sendLogin ) username and password are Edit fields
  15. i start to make a new login panel and more whit tabs now my problem is i make this its only a part of a big client and server script local window = guiCreateWindow(0.25,0.25,0.5,0.55,"|DGT| Clan Server",true) guiWindowSetSizable(window,false) guiWindowSetMovable(window,false) local tab = guiCreateTabPanel(0,0.05,1,0.85,true,window) local loginregister = guiCreateTab("Login/Register",tab) local rules = guiCreateTab("Rules",tab) local loginb = guiCreateButton ( 0.1, 0.8, 0.15, 0.15, "Login", true, loginregister ) local registerb = guiCreateButton ( 0.4, 0.8, 0.15, 0.15, "Register", true, loginregister ) guiSetProperty (loginb, "AlwaysOnTop", "true" ) guiSetProperty (registerb, "AlwaysOnTop", "true" ) and more many now my problem is i use addEventHandler ( "onClientGUIClick", loginb, sendLogin ) and many more but when i click on the window or on tab it click on all the button's on that tab and ... (if i click ex. on the loginregister tab it will loop all the addEventHandler ( "onClientGUIClick",..., ... ) for all button's on that tab panel ) how can i fix it thx for helping
  16. function spawn() local teamname= getTeamFromName(getPlayerTeam(source)) if teamname="the team name" then spawnPlayer (source, float x, float y, float z, [ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil ]) fadeCamera (source, true) setCameraTarget (source, source) end end
  17. in toptime when you finish the race it will cal a function you need to add when you get the hunter to call that function you can dowload a hunter toptime from here https://community.multitheftauto.com/ind ... ls&id=1345
  18. onPlayerJoin add +1 line onPlayerQuit remove the line and then gep players name and use guiCreateLabel and then guiSetText(label,txt)
  19. server side function send() local currentMap = exports.mapmanager:getRunningGamemodeMap() local mapname = getResourceInfo(currentMap, "name") or getResourceName(currentMap) triggerClientEvent ( "name", getRootElement(), name ) end addEvent("onMapStart",true) addEventHandler("onMapStart",getRootElement(),send) client side local gui =guiCreateLabel( float x, float y, float width, float height, "", true) --x,y,width and height are numbers between 0-1 function draw(name) guiSetText(gui,name) end addEvent("name",true) addEventHandler("name",getRootElement(),draw)
  20. i know he will trigger it from server to client's
  21. local currentMap = exports.mapmanager:getRunningGamemodeMap() local mapname = getResourceInfo(currentMap, "name") or getResourceName(currentMap)
  22. EDIT: local account = getPlayerAccount(player) local data =getAccountData(account,"skin") if skin then setElementModel(data) else ...--- here put the skin chose function and after setAccountData(account,"skin",getElementModel(player)) end
  23. if you make 1 spawnpoint for plane then only 1 player get the plane until are more player's as spawnpoint and if are more player's as spawnpoint's then you might get 2 plane's
×
×
  • Create New...