Jump to content

HerculePoirot

Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by HerculePoirot

  1. Lets say I have a lua file and I copy its content using file functions. Now how can I run that code for a specific client I want from the variable in which the string is saved ( the code of that file).
  2. can triggerEvent be used client sided to trigger a client sided event on a different client than the client where the triggerEvent was used?
  3. You can use:- interpolateBetween The examples are good to understand how it works.
  4. Not Working, now the GUI is also not opening.
  5. Here are the scripts:- The label doesn't shows the rank and deliveries. Server:- function bindRankInfo(player) local accountPlayer = getPlayerAccount(player) local rank = getAccountData(accountPlayer, "Rank") if (rank) then else setAccountData(accountPlayer, "Rank", "Novice") end local deliveries = getAccountData(accountPlayer, "deliveries") if (deliveries) then else setAccountData(accountPlayer, "deliveries", "0") end local team = getPlayerTeam(player) local teamName = getTeamName(team) if ( teamName == "Freight") then triggerClientEvent("rankShow", player, deliveries, rank) end end function binding() bindKey(source,"F5", "up", bindRankInfo) end addEventHandler("onPlayerJoin", getRootElement(), binding) Client :- function jobRankInfo(arg1, arg2) guiSetVisible(GUIEditor.window[2], not guiGetVisible(GUIEditor.window[2])) guiSetText(GUIEditor.label[1], "Your Current Deliveries are :-"..arg1.." You Rank:-"..arg2) guiSetInputEnabled(not guiGetInputEnabled) showCursor ( not isCursorShowing ()) end addEvent("rankShow", true) addEventHandler("rankShow", getRootElement(), jobRankInfo)
  6. Thanks Soldsnake14, I didn't knew about that. Thanks Mr.Pres[T]ege, it worked.
  7. I defined it in the server side script to create the ped
  8. The ped exists and there are no errors in script.
  9. The showing cursor part works but clicking on ped part does not work.
  10. I am trying to make a ped which gives a player job, whenever a player clicks on the ped the job take window should open. Whenever a player presses m cursor should show up or hide.
  11. there are no errors in console or debugscript but still its not working:- function pedClick(button, state, x, y, fx, fy, fz, clickedElement) if (button == "left" and state == "up") then if (clickedElement == "pedFreightJob") then guiSetVisible(GUIEditor.window[1], true) end end end addEventHandler("onClientClick", root, pedClick) function cursorShowing(button, press) if (button == "m") then if (press == "false") then showCursor(not isCursorShowing) end end end addEventHandler("onClientKey", root, cursorShowing)
  12. Is there any way to detect click on a specific ped?
  13. I suggest you to read wikipedia about what are sql queries etc.. and then look at mta db functions.
  14. I suggest that you use sql databases to have a list of gangs, use setAccountData for a player to be in a gang and you can also use sql database for associating gangs with their respective colors.
  15. You can use tables to make gangs and use radar functions for creating turfs.
  16. I think u should use tables and then extract a random entry from it using math.random and use the map assigned to that entry.
×
×
  • Create New...