Jump to content

ViRuZGamiing

Members
  • Posts

    1,050
  • Joined

  • Last visited

Everything posted by ViRuZGamiing

  1. Now i've made this; @Rex didn't test it because TA-PL told it was wrong
  2. Now I have; Client Server
  3. TAPL how's my table wrong? bcuz this is my first table EVER... should I use 1. getAccountData and setAccountData or 2. "OnPlayerQuit" and getTimers and setTimer
  4. So this should work? giftTable = { ['1'] = givePlayerMoney(source, 2000), ['2'] = outputChatBox( "Too bad you've won nothing today", source ), ['3'] = giveWeapon ( source, 31, 200 ), ['4'] = addPedClothes ( source, 9 ), ['5'] = removePedClothes ( source, 9 ) } function getGift math.random(#giftTable) end setTimer ( getGift, 86400000, 1, source ) addCommandHandler("gift", getGift) Testing it now and i'll reply if it works in 2-3 Minutes
  5. Hi, I want to make people use this command /gift once every 24 Hours to get something out of table. /gift > 1,2 or 3 out of the table and then you'll need to wait 1 day till command is back available. This is what I got;
  6. Maybe change getPlayerTeam to this; local playerTeam = getPlayerTeam (source) if (playerTeam) then
  7. errors? Debug?
  8. The part you didn't understand is to prevent Spamming the command and not using the setbounty more then once every 5 minutes... The first output is just to tell people they can use setbounty
  9. Hello Community, This is my first long self-written script i've went to wiki pretty much and wrote this.. It seems to work I also debugged it and removed errors before posting here. Now i want to ask you guys how to continue? What needs to happen? /bounty : Outputs "write /setbounty to set a bounty" /setbounty : should set a bounty of an amount on a player Setbounty explained Player 1 writes "/setbounty Player2 Amount" the amount will be taken from Player 1 Player 2 gets set in the team Bounty, A red nametag also appears. The first one who kills Player 2 gets the money and the nametag and team will be set to normal. Extra: People cannot set more then 1 bounty in 5 minutes < antispam I hope you guys understand what i mean it's a bit like GTA Online but with commands.
  10. Then it's good enough; Thx all!
  11. I've tested addCommandHandler ( "online", function () for i, v in ipairs ( getElementsByType ( "player" ) ) do outputChatBox ( getPlayerName ( v ) ) end end ) but i'm currently alone on a LAN Server what if i'm with 2 or more how would it be displayed? 1 Name a line? All behind eachother with just a space in between? greetz viruz
  12. Can I set a "," between everyname like this; Name1, Name2, ...
  13. Can I show all players onCommand? addEventHandler("online", function () --show online players part end )
  14. Hi Community, titles explaines it... but how?
  15. local x,y = guiGetScreenSize() local isCurrentlyDrawing = false function startDrawing() if(isCurrentlyDrawing == false) then addEventHandler("onClientRender", getRootElement(), stuffToDraw) isCurrentlyDrawing = true elseif(isCurrentlyDrawing == true) then removeEventHandler("onClientRender", getRootElement(), stuffToDraw) isCurrentlyDrawing = false end end function stuffToDraw() rectangle = dxDrawRectangle(screenW/3.8, screenH/3.8, screenW/2.02, screenH/2, tocolor(187, 0, 0, 150)) end function text x+1 end function checkKill if (killer) and (killer ~= source)then givePlayerMoney (killer, 1) setTimer(text, 1000, 1) addEventHandler("onPlayerWasted", getRootElement(), checkKill) Dealman you forgot to end the last function
  16. Can I set the DxDraw Invisible and show up when I get xp? I think this is a bit hard too try...
  17. so like you mean would be; local x,y = guiGetScreenSize() local rectangle = dxDrawRectangle(x/3.8, y/3.8, x/2.02, y/2, 0, 0, 255) function text x+1 end function checkKill if (killer) and (killer ~= source)then givePlayerMoney (killer, 1) setTimer(text, 1000, 1) addEventHandler("onPlayerWasted", getRootElement(), checkKill) Could this work? i'm on mobile again
  18. I know its a GUI and the dxDraw is moveable? I want not only money to be given i want xp bar to move too with dxDrawRectangle. Example; local x,y = guiGetScreenSize() local rectangle = dxDrawRectangle(x/3.8, y/3.8, x/2.02, y/2, 0, 0, 255) function checkKill if (killer) and (killer ~= source)thengivePlayerMoney (killer, 1000) addEventHandler("onPlayerWasted", getRootElement(), checkKill) end end Sry if its crap im mobile atm
  19. As the title says but is it possible,
  20. Thx i'll try it
  21. So you mean like this: Client: Server: function serverCamera triggerClientEvent ( "setCamera", getRootElement()) end addEventHandler("onPlayerLogin", localPlayer, serverCamera)
  22. Is it possible that I paste a Login in front of it and change the addEventHandler to "onPlayerSpawn" ? I know it becomes Server side then.
  23. I want to create like GTA V when I join the camera looks from up the air to the character and zooms in, how can i do the zoom in? local px, py, pz = getElementPosition ( getLocalPlayer ( ) ) function setCameraOnPlayerJoin() setCameraMatrix(source, px, py, pz+50, px, py, pz) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin)
  24. You'll need these ones, I'm a noob too but I guess these ones should do it; -- Server createVehicle getVehicleController getPlayerTeam setPlayerMoney setTimer --Client createTeam setPlayerTeam getPlayerOccupiedVehicleSeat
  25. You can create it with DxDraw
×
×
  • Create New...