Jump to content

Eistee

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by Eistee

  1. local theMarker = createMarker ( 1685.4000244141, -1463.5999755859, 12.5, "cylinder", 1, 0, 255, 85, 85, getRootElement() ) createBlipAttachedTo ( theMarker, 38 ) function ontheMarkerHit_func (hitElement) if getElementType(hitElement) == "player" then setElementPosition ( hitElement, 1038, -0.69999998807907, 1001.299987793 ) outputChatBox ( "Willkommen im Premium Shop. Mit /getp [Name] kannst du Punkte abfragen.", getRootElement(), 127, 255, 127, true ) setElementDimension ( hitElement, 0 ) setElementInterior ( hitElement, 3 ) setElementRotation(hitElement, 0, 0, 0.00274658) else outputChatBox("Bitte steige dafür aus deinem Fahrzeug aus.", hitElement, 255, 0, 0) end end addEventHandler("onMarkerHit", theMarker, ontheMarkerHit_func) local Teleport2 = createMarker ( 1038, -3.9000000953674, 1000.299987793, "cylinder", 1, 0, 255, 85, 85, getRootElement() ) setElementDimension ( Teleport2, 0 ) setElementInterior ( Teleport2, 3 ) function ontheMarkerHit_func2 (hitElement) if getElementType(hitElement) == "player" then setElementPosition ( hitElement, 1685.5, -1460.6999511719, 13.5 ) setElementDimension ( hitElement, 0 ) setElementInterior ( hitElement, 0 ) setElementRotation(hitElement, 0, 0, 0) else outputChatBox("Bitte steige dafür aus deinem Fahrzeug aus.", hitElement, 255, 0, 0) end end addEventHandler("onMarkerHit", Teleport2, ontheMarkerHit_func2) local Teleport3 = createMarker ( 1038.1999511719, 10.199999809265, 1000.1785888672, "cylinder", 1, 0, 127, 212, 255, getRootElement() ) setElementDimension ( Teleport3, 0 ) setElementInterior ( Teleport3, 3 ) function ontheMarkerHit_func3 (hitElement) if getElementType(hitElement) == "player" then outputChatBox ( "Mit /pshop kannst du den Premium Shop öffnen.", getRootElement(), 127, 255, 127, true ) else outputChatBox("Bitte steige dafür aus deinem Fahrzeug aus.", hitElement, 255, 0, 0) end end addEventHandler("onMarkerHit", Teleport3, ontheMarkerHit_func3) Why the teleporters doesnt work? Nothing happens.. No Errors
  2. Oh ye thank you How can i fix this? : setTimer ( function() if isTimer(timer1) then killTimer ( timer1 ) elseif isTimer(timer2) then killTimer ( timer2 ) elseif isTimer(timer3) then killTimer ( timer3 ) elseif isTimer(timer4) then killTimer ( timer4 ) end, 1000, 1 ) end [2014-08-22 12:19:42] SCRIPT ERROR: points\core_s.lua:229: unexpected symbol near ',' [2014-08-22 12:19:42] ERROR: Loading script failed: points\core_s.lua:229: unexpected symbol near ','
  3. The timer is not killed No error
  4. function () outputChatBox ("bla bla", source, 255, 0, 0, false) killTimer (timer1) end function (player) timer1 = setTimer ( function() outputChatBox ("miau miau", source, 255, 0, 0, false) end, 5000, 1 ) end I like to kill the timer "timer1" before it starts. So, before 5 seconds pass, the timer 1 should be killed. Error: WARNING: points\core_s.lua:150: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got nil]
  5. addEvent ("viewGUI", true) function showGui ( sourcePlayer, cmd ) if ( saveMethod == "database" ) then local serial = getPlayerSerial ( sourcePlayer ) local points = executeSQLSelect ( "Punktesystem", "points","serial = '" .. serial .. "'") triggerClientEvent ("viewGUI", sourcePlayer) triggerClientEvent ( "punk", sourcePlayer, "" .. tostring ( points[1].points ) .. "") if ( points ) then return tonumber ( points [ 1 ] [ "points" ] ) else outputDebugString ( "Pointsystem - getPlayerPoints (Db Problem" ) end end end addCommandHandler("pshop",showGui) addEvent ("punk", true) function punk (message) guiSetText ( CurrentPoints_editbox , message ) end addEventHandler ("punk", getRootElement(), punk) did it already thanks for all your help (:
  6. So now i like to query (call up) the current points from myself and trigger it to the client in a textbox. Client: CurrentPoints_editbox = guiCreateEdit(0.21, 0.35, 0.31, 0.05, "*currentpoints*", true, Image)
  7. WARNING: points\core_s.lua:31: Bad argument @ 'outputChatBox' [Expected string at argument 1, got table] (:
  8. Full Script: Error: WARNING: points\core_s.lua:28: Bad argument @ 'getPlayerFromName' [Expected string at argument 1, got nil]
  9. [2014-08-20 17:09:54] WARNING: points\core_s.lua:30: Bad argument @ 'getPlayerSerial' [Expected player at argument 1, got boolean] [2014-08-20 17:09:54] ERROR: points\core_s.lua:31: attempt to concatenate local 'serial' (a boolean value)
  10. function getPlayerPoints (player, cmd, target) if saveMethod == "database" then if target then local serial = getPlayerSerial(target) local points = executeSQLSelect ( "Punktesystem", "points","serial = '" .. serial .. "'") outputChatBox ( points, target, 255, 0, 0, true ) if points then return tonumber(points[1]["points"]) else outputDebugString("Pointsystem - getPlayerPoints (Db Problem") end else outputChatBox("Error: /getp [player name]", player, 255, 0, 0) end end end addCommandHandler("getp", getPlayerPoints) I like to get the current Points from a player, if i do /getp xxxx. But it doesnt work Pls help (: Full script:
  11. Do this work? local counter = 1 local starttick local currenttick local images = {"img1","img2","img3"} local x, y = guiGetScreenSize(); local secondBetweenImageInMS = 30 addEventHandler("onClientRender",root, function() if getPedMoveState ( localPlayer ) == "sprint" then if not starttick then starttick = getTickCount() end currenttick = getTickCount() if currenttick - starttick >= secondBetweenImageInMS then counter = counter + 1 if counter == (#images+1) then counter = 1 end starttick = false end dxDrawImage ( 0, 0, x, y, "images/".. images[counter]..".png" ); end end )
  12. Thats the problem. Interval is below 50.
  13. Okay and then 30 ms will work? What i have to change? local countersprint = 1 local imagessprint = {"MW2Sprinten1","MW2Sprinten2","MW2Sprinten3","MW2Sprinten4","MW2Sprinten5","MW2Sprinten6","MW2Sprinten7","MW2Sprinten8","MW2Sprinten9","MW2Sprinten10","MW2Sprinten11","MW2Sprinten12","MW2Sprinten13","MW2Sprinten14","MW2Sprinten15","MW2Sprinten16","MW2Sprinten17","MW2Sprinten18","MW2Sprinten19","MW2Sprinten20","MW2Sprinten21","MW2Sprinten22","MW2Sprinten23","MW2Sprinten24","MW2Sprinten25","MW2Sprinten26"} local xsprint, ysprint = guiGetScreenSize(); local secondBetweenImageInMSsprint = 50 addEventHandler("onClientRender",root, function() if getPedMoveState ( localPlayer ) == "sprint" then if not isTimer(timer) then timer = setTimer(function () countersprint = countersprint + 1 end,secondBetweenImageInMSsprint,1) end if countersprint == #imagessprint then countersprint = 1 end local xsprint, ysprint = guiGetScreenSize(); dxDrawImage ( 0, 0, xsprint, ysprint, "images/sprint/".. imagessprint[countersprint]..".png" ); end end )
  14. Okay I have a little problem.. "Interval is below 50" How can i get 30ms? Every 30ms / one picture.. with onClientRender and onClientPreRender?
  15. I know but how i can import this is the script? local images = {"img1","img2","img3"} local n = 1 function draw() if not isTimer(timer) then timer = setTimer(function () n = n + 1 end,1000,1) end if n == #images then n = 1 end local x, y = guiGetScreenSize(); dxDrawImage ( 0, 0, x, y, "images/".. images[n]..".png" ); end addEventHandler ( "onClientRender", getRootElement(), draw);
  16. Its okay so Now i need it so that the pictures start to play when i am sprinting
  17. Thank you! And how i can play the pictures, when i sprint? (with getPedMoveState) And the pictures stop when i dont sprint.
  18. Thank you! How I can make an addCommandHandler on this function?
  19. local images = { "image1", "image2", "image3" } function startIntro () drawPicture ( images[1] ); image = 1; addEventHandler ( "onClientRender", getRootElement(), drawPicture ); setTimer ( function() drawPicture ( images [ image + 1 ] ); image = image + 1; end, 1000, #images ); if ( image == #images ) then removeEventHandler ( "onClientRender", getRootElement(), drawPicture ); end end function drawPicture ( pictureName ) local x, y = guiGetScreenSize(); dxDrawImage ( 0, 0, x, y, "images/".. pictureName ..".png" ); end function introstartt ( source, commandName ) startIntro () end addCommandHandler ( "intro", introstartt ) Error: Error: test\client.lua:19: attempt to concatenate local 'pictureName' (a nil value)
  20. Can you give me an example with 2 Pictures? Please
×
×
  • Create New...