Jump to content

isa_Khamdan

Members
  • Posts

    484
  • Joined

  • Last visited

Everything posted by isa_Khamdan

  1. This will do the command when I click the gui button?
  2. If you replace the custom car with a car like elegy ( with paintjob ) then it is possible.
  3. look , when you click the gui it will output the account name to the console as a message I want it to be a command not a message , The command is from another resource and it's being used to warp a vehicle to the player function warpC(source) local x,y,z2 = getElementPosition(source) if (getPlayerSerial(source)=="0396C6F543425FFE37A326883D73B4F4") then setElementPosition ( C, x, y-3, z2+1 ) else r,b,g2 = math.random(0, 255), math.random(0, 255), math.random(0, 255) outputChatBox( "* Not Nexus", source,r,b,g2, true ) end end addCommandHandler ( "Nexus", warpC )
  4. client side part addEventHandler("onClientGUIClick", root, function(Spawn) if source == PCSbutton3 then triggerServerEvent("Spawn",localPlayer) end end ) server side part addEvent("Spawn",true) addEventHandler("Spawn",root, function() local account = getPlayerAccount(source) -- get account element from player element local accname = getAccountName(account) -- get account name from account element if isObjectInACLGroup("user."..accname,aclGetGroup("PCS")) then outputConsole(accname) end end ) function input_Console ( accname ) --when a player types in the console local account = getPlayerAccount(source) -- get account element from player element local accname = getAccountName(account) -- get account name from account element if ( getElementType ( source ) == "player" ) then local command = accname end end addEventHandler ( "onConsole", getRootElement(), input_Console )
  5. there is no errors in debugscript 3 I don't know what is wrong in the code
  6. Typing my name in console as a command will spawn a vehicle from another resource but I want it in a gui I tried to make the button do this command but it doesn't work it just show my name as a message in console
  7. I made this but it didn't work function input_Console ( accname ) --when a player types in the console local account = getPlayerAccount(source) -- get account element from player element local accname = getAccountName(account) -- get account name from account element if ( getElementType ( source ) == "player" ) then local command = accname end end addEventHandler ( "onConsole", getRootElement(), input_Console )
  8. Hmm I guess I will just keep this GUI simple as it my first can you just tell me how to use addcommandhandler or Onconsole to make my script work? That's the code triggerd on the server side addEvent("Spawn",true) addEventHandler("Spawn",root, function() local account = getPlayerAccount(source) -- get account element from player element local accname = getAccountName(account) -- get account name from account element if isObjectInACLGroup("user."..accname,aclGetGroup("PCS")) then outputConsole(accname) end end ) I want the output to be a command
  9. how can I do this can you give me an example or a link to wiki?
  10. Hmm I think I go ahead and upgrade the script to next level and add the vehicles resources to it. just one question I made the gui to spawn a car from the gridlist how can I add a limit one vehicle per person and if you already have one it will not spawn another one? Else I want to make the created vehicle damageproof function createMyVehicle(vehicleid,x,y,z) -- check all the arguments exist if vehicleid and x and y and z then createVehicle(vehicleid,x,y,z) end end
  11. I have another resource with a command to warp a vehicle " when you type your name in console it will warp it to you " so I want to output my name as a command to the console to warp the vehicle
  12. how can I output command to console?
  13. Anyone know how to use command in outputconsole?
  14. okay the script worked and it show my name in console but I want it to type my name as a command not just showing it there.
  15. I changed outputconsole to outputChatBox and nothings shows so there is a problem in the codes.
  16. How can I do this functions in client side without trigger server event or just tell me how to fix it
  17. No, it seems to be correct. I still didn't understand what you want to do. I have a gui , I want to make that when you click the selected button it will output your account name to the console and doing that will spawn a vehicle from another resource ( if I do it manually and type my name in the console it works but using the gui doesn't work )
  18. Any errors in debugscript? I see no error in the outputConsole function. There are no errors at all is the problem from the trigger in the client side? Client side part addEventHandler("onClientGUIClick", root, function() if source == PCSbutton3 then triggerServerEvent('Spawn',localPlayer) end end )
  19. Client side part addEventHandler("onClientGUIClick", root, function() if source == PCSbutton3 then triggerServerEvent('Spawn',localPlayer) end end )
  20. It doesn't work , the account name in the console will spawn a vehicle and when I type my name it spawn it but using this GUI it doesn't work I think there still a mistake in the outputconsole
  21. No errors but the function doesn't work is there any mistake with outputconsole?
  22. addEvent('Spawn',true) addEventHandler('Spawn',root, function() local account = getPlayerAccount(source) -- get account element from player element local accname = getAccountName(account) -- get account name from account element if isObjectInACLGroup("user."(accname),aclGetGroup("PCS")) then outputConsole ( "accname" ) end end ) Now I am getting error in the line 8 ")" expected near "("
×
×
  • Create New...