Jump to content

FSXTim

Members
  • Posts

    220
  • Joined

  • Last visited

Everything posted by FSXTim

  1. Hallo, ich möchte euch hiermit German Blue Race vorstellen. • Daten • Informationen • Features • Daten Servername: German Blue Race Server-IP: 85.131.236.246:22003 Forum: Folgt bald • Informationen German Blue Race wurde von mir in ca. zwei Monaten Arbeit gescriptet. Tests werden über einen lokalen Server durchgeführt und gespielt wird auf einem 24/7 Root-Server. Blue Race ist am 14.06.2012 zum ersten Mal online gegangen. Die Accountdaten werden in einer Datenbank gespeichert. • Features • Commands /repair: Fahrzeug reparieren, wenn Repair-Item vorhanden /tampa: Fahrzeug in Tampa verwandeln, wenn Tampa-Item vorhanden /nitro: Nitro einbauen, wenn Nitro-Item vorhanden /freeze: Fahrzeug freezen, wenn Freeze-Item vorhanden /bombe: Bombe explodieren lassen, wenn Bomben-Item vorhanden /support: Support-Fenster öffnen • Binds u: Menü öffnen i: Smartphone öffnen tab: Playerlist anzeigen • Register/Login • Accountdaten werden gespeichert • Regeln • Userpanel • Informationen • Chat • Shop • Items • Status • Discoknopf • Inventar • Anzahl der Items • Items benutzen • VIP/VIP Shop • Blue Points kaufen • Spezielle Items • Eigener Status • Smartphone • 9 Apps • Support • Tickets • geschlossen/offen • Speicherung in Datenbank • Playerlist • Werte aus der Datenbank • Join/Quit • Join-/Quit-/Willkommens-Nachricht • Anti-AFK-System • Spieler wird nach 120 Sekunden gekickt • Infobox • alle 10 Minuten Infobox • Hunter Top Times • die Top Times der Map werden angezeigt • Sonstiges • No Blur • Fraps: 50 VG
  2. Hello, I used this ressource a few minutes ago and i recorded a record. https://community.multitheftauto.com/index.php?p= ... ils&id=461 I don't want to enter '/playpedrecord (id) (skin)' everytime. I want to start a record via a script, but how could I do this? Maybe like this? function playpedrecord(47, 1) end Greets
  3. Thanks, this works! Greets
  4. Hello, I need an event for race markers. For useally markers, there is the 'onMarkerHit' event, but I need an event for race-car-change-markers. Greets
  5. I can still toggle the radio. function playerListKeyPressed (button, state) if state == "down" then toggleControl ( "radio_next", false ) toggleControl ( "radio_previous", false ) toggleControl ( "next_weapon", false ) toggleControl ( "previous_weapon", false ) if isTimer ( playerListUpdateTimer ) then killTimer ( playerListUpdateTimer ) end scollBarAdjustTimer = setTimer ( reAdjustPlayerListScollBar, 50, -1 ) bindKey ( "mouse_wheel_up", "down", playerListScrollUp ) bindKey ( "mouse_wheel_down", "down", playerListScrollDown ) showPlayerList () addEventHandler("onClientPlayerRadioSwitch", getLocalPlayer(), function () setRadioChannel(0) end ) else toggleControl ( "radio_next", true ) toggleControl ( "radio_previous", true ) toggleControl ( "next_weapon", true ) toggleControl ( "previous_weapon", true ) killTimer ( scollBarAdjustTimer ) unbindKey ( "mouse_wheel_up", "down", playerListScrollUp ) unbindKey ( "mouse_wheel_down", "down", playerListScrollDown ) guiSetVisible ( gImage["playerList"], false ) end end bindKey("tab", "both", playerListKeyPressed) Greets
  6. Ok, I did, but I can still toggle the radio. Greets
  7. Hello, I get errors at all 'toggleControl'-lines (Bad argument). function playerListKeyPressed ( key, state ) if state == "down" then radioUpState = isControlEnabled ( "radio_next" ) radioDownState = isControlEnabled ( "radio_previous" ) weaponUpState = isControlEnabled ( "next_weapon" ) weaponDownState = isControlEnabled ( "previous_weapon" ) toggleControl ( source, "radio_next", false ) toggleControl ( source, "radio_previous", false ) toggleControl ( source, "next_weapon", false ) toggleControl ( source, "previous_weapon", false ) if isTimer ( playerListUpdateTimer ) then killTimer ( playerListUpdateTimer ) end scollBarAdjustTimer = setTimer ( reAdjustPlayerListScollBar, 50, -1 ) bindKey ( "mouse_wheel_up", "down", playerListScrollUp ) bindKey ( "mouse_wheel_down", "down", playerListScrollDown ) showPlayerList () else toggleControl ( "radio_next", radioUpState ) toggleControl ( "radio_previous", radioDownState ) toggleControl ( "next_weapon", weaponUpState ) toggleControl ( "previous_weapon", weaponDownState ) killTimer ( scollBarAdjustTimer ) unbindKey ( "mouse_wheel_up", "down", playerListScrollUp ) unbindKey ( "mouse_wheel_down", "down", playerListScrollDown ) guiSetVisible ( gImage["playerList"], false ) end end bindKey ( "tab", "both", playerListKeyPressed ) Greets
  8. I tried this, only one 'getElementData': function onStart () for index, source in pairs (getElementsByType("player")) do local result = mysql_query(sqlcon, "UPDATE user_data SET Adminlevel='"..getElementData(source,"Adminlevel").."' WHERE Username='"..getElementData(source,"Username").."';") mysql_free_result( result ) end setTimer(onStart, 50, 1, 0) end addEventHandler ( "onResourceStart", getRootElement(), onStart ) Same Error (line3): attempt to concatenate a boolean value
  9. I did that. function onTest (player) outputChatBox(""..getElementData(player, "Adminlevel").."") outputChatBox(""..getElementData(player, "Spielzeit").."") outputChatBox(""..getElementData(player, "Geld").."") outputChatBox(""..getElementData(player, "Status").."") outputChatBox(""..getElementData(player, "Wins").."") outputChatBox(""..getElementData(player, "Repairs").."") outputChatBox(""..getElementData(player, "Nitros").."") outputChatBox(""..getElementData(player, "Tampas").."") outputChatBox(""..getElementData(player, "Freezes").."") outputChatBox(""..getElementData(player, "Bomben").."") end addCommandHandler("testing", onTest) Result: 1 0 300 Scripter 1 2 0 0 0 0 Greets
  10. What do you mean? In my database there is a table, which calls 'Tampas'. Greets
  11. Hello, I have an error in my script (line 5): attempt to concatenate a boolean value function onStart () for index, source in pairs (getElementsByType("player")) do local result = mysql_query(sqlcon, "UPDATE user_data SET Adminlevel='"..getElementData(source,"Adminlevel").."', Spielzeit='"..getElementData(source,"Spielzeit").."', Geld='"..getElementData(source,"Geld").."', \ Status='"..getElementData(source,"Status").."', Wins='"..getElementData(source,"Wins").."', Repairs='"..getElementData(source,"Repairs").."', Nitros='"..getElementData(source,"Nitros").."', \ Tampas='"..getElementData(source,"Tampas").."', Freezes='"..getElementData(source,"Freezes").."', Bomben='"..getElementData(source,"Bomben").."' WHERE Username='"..getElementData(source,"Username").."';") mysql_free_result( result ) end setTimer(onStart, 50, 1, 0) end addEventHandler ( "onResourceStart", getRootElement(), onStart ) Greets
  12. I found a solution. Greets
  13. Hello, I created my own scoreboard and I don't want to see the default scoreboard ingame. I deleted the following line in the mtaserver.conf: "scoreboard" startup="1" protected="0"/> Error in the console: exports: Call to non-running server resource (scoreboard) [string "?"] The scoreboard is still there ingame. When I type '/stop scoreboard', the scoreboard is deleted ingame, but I don't want to type this command everytime. Greets
  14. function repair1 () if (tonumber(getElementData(source, "Money")) >= 50) then outputDebugString(getElementData(source,"Money")) setElementData(source, "Money", getElementData(source, "Money") - 50) outputChatBox ("Dein Auto wurde repariert!", source, 0, 205, 0 ) else outputChatBox("Du hast nicht genug Geld!", source, 255, 48, 48) end end addEvent ( "repair1", true ) addEventHandler ( "repair1", getRootElement(), repair1 ) Nothing happens now. Just nothing. Also no DebugString. Greets
  15. Hello, I triggered something. (clientside --> serverside) Error in the serverside script (line 2): Bad argument @ 'getElementData' [Expexted element at argument 1, got nil] clientside: function repair1_Button (state) if state == "left" then if source == GUIEditor_Button[1] then local lp = getLocalPlayer() triggerServerEvent("repair1", lp) end end end addEventHandler("onClientGUIClick", getRootElement(), repair1_Button) serverside: function repair1 (lp) if (tonumber(getElementData(lp, "Money")) >= 50) then outputDebugString(getElementData(lp,"Money")) setElementData(lp, "Money", getElementData(lp, "Money") - 50) outputChatBox ("Dein Auto wurde repariert!", lp, 0, 205, 0 ) else outputChatBox("Du hast nicht genug Geld!", lp, 255, 48, 48) end end addEvent ( "repair1", true ) addEventHandler ( "repair1", getRootElement(), repair1 ) Greets
  16. I found a solution. Greets
  17. Hello, I have a small problem with my script, it's a playerlist. 'name', 'playingtime' and 'ping' are list in the playerlist. 1. At 'rang', there is 'false', and not the 'status' (state). 2. At 'nr', there is nothing. Error: Bad argument @ 'guiSetText' [Expected string at argument 2, got nil] at this line: guiSetText ( playerListLabels[k][4], nr ) function reFillPlayerList () for key, index in pairs ( playerListLabels ) do for i = 1, 5 do guiSetText ( playerListLabels[key][i], "" ) end end local i = 0 local k = 0 local name, rang, playingtime, ping for key, index in pairs ( playersOnline ) do i = i + 1 if k > maxPlayersInCurList then break end if i >= curPlayerListPosition then k = k + 1 name = getPlayerName(index) rang = tostring(getElementData(index,"Status")) ping = tonumber(getPlayerPing(index)) nr = tonumber(getElementData(index, "Wins")) playingtime = getElementData ( index, "PlayedH" ) playingtime = math.floor ( playingtime / 60 )..":"..( playingtime - math.floor ( playingtime / 60 ) * 60 ) guiSetText ( playerListLabels[k][1], name ) guiSetText ( playerListLabels[k][2], rang ) guiSetText ( playerListLabels[k][3], playingtime ) guiSetText ( playerListLabels[k][4], nr ) guiSetText ( playerListLabels[k][5], ping ) pr, pg, pb = getPingColor ( ping ) guiLabelSetColor ( playerListLabels[k][5], pr, pg, pb ) end end end Greets
  18. Thanks, that's working. Greets
  19. I know, but it doesn't. Greets
  20. Hello, I have a small problem with my script. function ergebnisGet (state) if state == "left" then if(source == cGleich) then local value1 = guiGetText(eingabe1) local value2 = guiGetText(eingabe2) local result = guiGetText(zwischeneingabe) if result == "+" then guiSetText(ergebnis,tonumber(value1)+tonumber(value2)) end if result == "x" then guiSetText(ergebnis,tonumber(value1)*tonumber(value2)) end end end end addEventHandler("onClientGUIClick", getRootElement(), ergebnisGet) The calculation with + works, but the calculation with * doesn't work. Why? Greets
×
×
  • Create New...