Jump to content

MasterTobi

Members
  • Posts

    78
  • Joined

  • Last visited

Everything posted by MasterTobi

  1. hey ClientSide : function gui() local screenWidth, screenHeight = guiGetScreenSize() if screenHeight < 700 then g_MapSide = 450 else g_MapSide = 700 end local width = g_MapSide + 20 local height = g_MapSide local X = 0 local Y = 0 wdwMap = guiCreateWindow( X, Y, width, height, "Map", false ) imgMap = guiCreateStaticImage ( X, Y, g_MapSide, g_MapSide, "map.png", false, wdwMap ) addEventHandler("onClientGUIDoubleClick", imgMap, map, false) end function make() gui() if (wdwMap ~= nil) then guiSetVisible(wdwMap, true) else outputChatBox("Ein Problem mit der GUI besteht, bitte benachrichtige einen Admin") end showCursor(true) guiSetInputEnabled(true) end function map(button, state, relX, relY) px = ((relX*6000 /g_MapSide)-3000) py = (3000 - (relY*6000/g_MapSide)) triggerServerEvent("sp",getLocalPlayer(),px,py) guiSetVisible(wdwMap, false) showCursor(false) guiSetInputEnabled(false) end addCommandHandler("t", make) ServerSide function createmaker(x, y) createMarker ( x,y,13) end addEvent("sp",true) addEventHandler("sp",getRootElement(),createmaker,px,py)
  2. hey @ all my Problem is when i add a column to my dadabase, the ******* error is coming Database query failed near "WHERE: " syntax error -.- executeSQLQuery( "ALTER TABLE ADD COLUMN (size) DEFAULT " ) sql.Query( "ALTER TABLE Playercars ADD COLUMN 'bla TEXT' DEFAULT 'none' WHERE Carid = ?", carid ); where is the problem ? pls need help
  3. ok i have solved this problem, i have to write file = xmlLoadFile(":myfoldertwo/Cars/car"..id..".xml") but the console say : ModifyOtherObjects in ACL denied resource myfolder to accses myfoldertwo WTF ?! and how i fixxed it ?
  4. hey i have a problem in my script, i open files in a folder like: file = xmlLoadFile( "cars/car"..id..".xml") the folder is where the script lie the script lies in MTA/SERVER/MODS/DEATHMATCH/RESOURCE/MYFOLDER and the Folder : MTA/SERVER/MODS/DEATHMATCH/RESOURCE/MYFOLDER/CARS omg so in an another script i have written, lie in myfolder. the Code: file = xmlLoadFile( ../myfoldertwo/Cars/car"..id..".xml") so also the script have to change the folder to find the file ind myfoldertwo, but this does not go. i need a little bit help
  5. if i understand you correctly then have you not a meta.xml for your script /map and second if have a script/map an error, you can´t start this map/script. also create the meta.xml for your map and then restart the server
  6. hm you have to use the function guiBringToFront also : ....... RegisterButton = guiCreateButton(229,173,100,36,"Registrieren",false,LoginFenster) guiSetFont(RegisterButton,"default-bold-small") guiBringToFront(LoginFenster) end addEventHandler("onClientPlayerJoin", getRootElement(), LoginWindow)
  7. nope thats not going if the train outside my screen then stops the train or GTA delete the Train because of the LOD -.-
  8. hm if i create a ped and port it into the tram then i have created a player so hypothetical or not ?! then have to drive the train from ls to SF because the Ped is a Player or not and the train/tram drives because the LOD is under 300units ?!
  9. yes setelementdata i have a car system, and i used setElementData for my carID´s
  10. oh yes right but engineSetModelLODDistance (449, 1000 ) don´t go
  11. hm ok but there is function names engineSetModelLODDistance ( int model, float distance ). It means i can switch the distance from an object or model over 500units or not ?! But when i write engineSetModelLODDistance (449, 1000 ) or Tram1 = createVehicle(449,1794.4580078125, -1953.744140625, 13.546875, 90.476531982422 ) engineSetModelLODDistance (Tram1, 1000 ) "499 = Tram" then say me the Console engineSetModelLODDistance attempt to call global what is wrong?! i need help
  12. hey i searched in the Forum and i read thats the Trains not drive if nobody in it is. is it correctly !? if it´s wrong then is my question, why stops the train after 100meters to drive when i say setTrainSpeed(thetrain,10)
  13. hm sql or the account data from mta, also accounts.xml ? if you use the accounts.xml then you have to write setAccountData(.....) and use the wiki
  14. here https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions#Account_functions
  15. MasterTobi

    SQL =(

    hey i have to start whit SQL Scripting so; i searched in this Forum and nothing help´s me. I used the Wiki, the Wiki says, use function createSQLOnStart () -- create our table, if it doesn't already exist executeSQLCreateTable ( "players", "clothes_head_texture TEXT, clothes_head_model TEXT, player TEXT" ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()),createSQLOnStart ) so when i restart my server then creates me a new table -.- can i don´t save the actual Table ?! with SQL ?! =( i have sqllitedatabaseBrowser, and i have created a database with DatabaseName(Accounts) and "options" PlayerName and Password i have to start this databse with the functions from mta, is there any way !? or have anybody a good tutorial for sql ?! Thx a lot Tobi
  16. hm yes this is a good resource but when i restart the resource then is the record fly away also i need a resource where saves the rec thx@ all
  17. hey in samp there is a function called NPC:StartRecordingPlayback is there a function in mta like NPC:StartRecordingPlayback hey in samp gibts ne funtion NPC:StartRecordingPlayback gibts die auch in MTA thx
  18. ah ok spezial thx then i use if elseif
  19. hey hey in c++ or delphi , i can write switch(variable) { case 1: blalbla;exit case 2: blalbla;exit case 3: blalbla;exit ..... } it gives such a thing also in lua ?
  20. ups sry I forgot about it.Does not occur again. sry
  21. hey also ich hab das so gelöst, du betrittst den marker, dann geht das Tor nach unten, du verlässt den marker dann gehts wieder nach oben p.s. den marker sieht man nicht gsgMarker1 = createMarker (-380.45233154297, 1383.7810058594 , 44.376697540283 ,"cylinder",5, 0, 0, 255, 0 ) function createGateSp () gsg1 = createObject (2933 , -380.45233154297, 1383.7810058594 , 44.376697540283, 0 , 0, 202.46923828125) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGateSp ) function gateCheckinggsg (thePlayer) local playeraccount = getPlayerAccount (thePlayer) Team = getAccountData (playeraccount, "Team") if (Team == "GSG9") then moveObject ( gsg1,3000, -380.45233154297, 1383.7810058594 , 5.376697540283) end end addEventHandler ( "onMarkerHit", gsgMarker1, gateCheckinggsg ) function onLeave ( thePlayer, matchingDimension ) setTimer ( movingBackgsg1, 3000, 1, thePlayer ) end addEventHandler ( "onMarkerLeave", gsgMarker1, onLeave ) function movingBackgsg1 () moveObject ( gsg1, 3000, -380.45233154297, 1383.7810058594 , 44.376697540283) end
  22. hm mom why go this code ? stadt= createMarker (1219, -1812, 16,"arrow", 1.5, 255, 255, 0, 170 ) stadtin= createColCircle (1219, -1812,2) stadtout =createColCircle (288,167, 2) stadto= createMarker (288,167,1007,"arrow", 1.5, 255, 255, 0, 170 ) function stadt() if (isElementWithinColShape(source,stadtin)) then setElementInterior(source,3, 288.745971,169.350997,1007.171875 ) end if (isElementWithinColShape(source,stadtout))then setElementInterior ( source,0, 1223.9,-1817.09,16.6 ) end end addEventHandler( "onElementColShapeHit", getRootElement(), stadt )
×
×
  • Create New...