Jump to content

BennyBunny

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by BennyBunny

  1. THX for the help i use isTransferBoxActive perfect for my login script
  2. How can i find out when a player comes in my server he is dowloading? So that my login kick not kick him when he is still dowloading?
  3. I found some post about the col load fail from mta and i have hope with MTA 1.1 someone fix the bug. But i have still the bug when a player jump on my big new object he fall down like there is nothing. After the reload everything is fine. So is that now only my problem or is there a way for fix that now??
  4. I have a little script when the player die he see for 10 sec the spawn place. That work good when the player die in the normal dimension. The problem is when the player die in a other one he see nothing no objects... function deathHandler( ) local zufalldeath = math.random(1, 4) local zufallskin = math.random(7, 288) setElementDimension ( source, 0 ) -- that was my test for get the dimension back to 0 but nothing fadeCamera ( source, true, 5 ) setCameraMatrix ( source, -2148.55859375, 2326.0148925781, 25.234376907349, -2225.376953125, 2325.0148925781, 23.234376907349, 0, 0 ) ... end addEventHandler("onPlayerWasted", getRootElement(), deathHandler) in the middle i have only the spawn things and read my db for add some things nothing special. So how can i get the normal dimension back when the player die so that the CameraMatrix have the right dimension??
  5. MTA 1.1 is now out and so i must edit the freeroam script again... I start with my sever over a year agao with a stop in the middle lol And the freeroam script was one of the first what i have edit. And now i cant remember what i must delete so that i get not more the freeroam map on the start and when the player die. Can someone say me again where is the part for this? THX
  6. I wanna say a BIG thx for all the help! A special thx to 50p for the super big help with the spawn menu!!! And for a answer of all my sometimes stupid questions! And a big thx to JR10 too Good to know that a good scripter help here!
  7. I have a windwo and wanna put it in bottom left corner. In wiki i found guiGetScreenSize () but when i use that i get a player monitor size ok but there are sooooo a lot different on so i must add for all a script with the right numbers for my window place. Is there a other easy way for add a window in a corner??
  8. can somone help me plz i that is the last part of my script then i have finish my race script. I need that for get the top 3 winner in window when the player finish the race. For that i need the data from the db to the client for the top 3 winner but i try and try nothing
  9. I wanna get some data from the server back to the client but on the client side i get nothing Server side: function drivtsavetop ( savetimerfortopdrift ) -- get the time from client that is savetimerfortopdrift addrealnumberdrift = tonumber(savetimerfortopdrift) local playernamedrift = getPlayerName ( source ) ... senddatatoclienttest = test triggerClientEvent ( "serverdatadrift", getRootElement(), senddatatoclienttest ) ... addEvent( "driftsendtoclient", true ) addEventHandler( "driftsendtoclient", getRootElement(), drivtsavetop ) -- add the sever side function in the client one client side: function getdatafromserverdrift ( senddatatoclienttest ) datafromserverdrifttimeone = senddatatoclienttest end addEvent( "serverdatadrift", true ) addEventHandler( "serverdatadrift", getRootElement(), getdatafromserverdrift ) function drivestart ( thePlayer ) ... if markercontrolldrift == 16 ... -- Test for save top 3 timer outputChatBox ( "timer:"..savetimerfortopdrift, 0, 255, 0, thePlayer ) triggerServerEvent ( "driftsendtoclient", getLocalPlayer(), savetimerfortopdrift ) -- send the end timer to the server for check and save outputChatBox ( "test for data from server:"..datafromserverdrifttimeone, 0, 255, 0, thePlayer ) -- -------------------------------------- -- end end addEventHandler ( "onClientMarkerHit", checkpointdriftone, drivestart )
  10. yh that was the problem lol THX But now i have a other question i bet super easy but i have never done this before. Now i have the end time from the race: (client side) savetimerfortopdrift = tostring(tonumber(drifttimer)) how can i send that now to my script where is the db for check is the time in the top 3 or not. (server side)?
  11. I have done a nice race script for my server with a race timer. So i wanna save now the best 3 Times with the player name. For that i have crate that table you can see it in my script. I have add a clean too for that is "cleandrift" But the problem is now i cant read the db for the first test idk why So that the player when he finish the race he can see the best 3 times. That is my first stap function createNewUDatabankForDrift () executeSQLCreateTable ( "drifttoptimes", "driftonetimedb INTEGER, winneronedriftdb TEXT, drifttwotimedb INTEGER, winnertwodriftdb TEXT, driftthreetimedb INTEGER, winnerthreetimedb TEXT, findtextdb INTEGER" ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createNewUDatabankForDrift ) function driftcleartoplist ( playerSource ) if hasObjectPermissionTo ( playerSource, "function.kickPlayer", false ) then outputChatBox ( "The Drift to 3 have set to 0", 0, 255, 0, source ) executeSQLInsert ( "drifttoptimes", "'0', 'No Name', '0', 'No Name', '0', 'No Name', '1'" ) end end addCommandHandler ( "cleandrift", driftcleartoplist ) function drivtsavetop () outputChatBox ( "Player have finish the race and start now the timer controll save", 0, 255, 0, source ) winnertimeone = executeSQLQuery ( "drifttoptimes", "driftonetimedb", "findtextdb = '1'" ) outputChatBox ( "Best Time from drift race is" ..winnertimeone[1].driftonetimedb, 0, 255, 0, source ) end addEvent( "driftsendtoclient", true ) addEventHandler( "driftsendtoclient", getRootElement(), drivtsavetop )
  12. I have add a new object in mta A nice vulcan and i have edit the txd, col, dff and when i spawn on it no problem. I have a nice spawn menu and the player can spawn good and fast from one place to the other one. So when i spawn 2-3 on the vulcan boom i fall down like there is nothing When i restart the full file it works fine for 2-3 teleports and i have the same problem again I could use a script for restart it again but i ask me where is the problem?
  13. atm i work with the cratewater and there are some problems. When the water is over 1000 hight the water have no texture. And i cant make a water area out of the world boundaries I wanna make a boat jump so i need a hight water area but a jump with 1000 hight is no fun And a better place for a jump is out of the world boundaries there is more space for that. So is there a way for add this in mta 1.1? - Water texture over 1000 hight - cratewater out of the world boundaries
  14. hm... the next one is when i add the water hight over 1000 there is the water but no texture from the water lol Is there a way when the mta do so or so a new version of mta to fix all this? So that we can add water over the world boundaries and over 1000 hight.
  15. I have try a long time now add my water area in out of the map but everything what i have try no water. So i have start a test and found out that when the water area is on the map no problem. But when i wanna crate a water are not on the map outside the ocean then create water is not more working. Try it self here is my test... function thaResourceStarting( ) water = createWater ( -3778, -1579, 10, -4025, -1579, 10, -3778, -1381, 10, -4025, -1381, 10 ) -- water = createWater ( 1867, -1444, 10, 1968, -1443, 10, 1867, -1372, 10, 1968, -1370, 10 ) -- water = createWater ( 17, -1544, 10, 118, -1543, 10, 17, -1472, 10, 118, -1470, 10 ) -- water = createWater ( -1, -1544, 10, 109, -1543, 10, -1, -1472, 10, 109, -1470, 10 ) -- water = createWater ( -100, -1544, 10, 9, -1543, 10, -100, -1472, 10, 9, -1470, 10 ) -- water = createWater ( -100, -1579, 10, 9, -1579, 10, -100, -1381, 10, 9, -1381, 10 ) -- water = createWater ( -200, -1579, 10, -91, -1579, 10, -200, -1381, 10, -91, -1381, 10 ) -- water = createWater ( -2000, -1579, 10, -1891, -1579, 10, -2000, -1381, 10, -1891, -1381, 10 ) -- water = createWater ( -2900, -1579, 10, -2791, -1579, 10, -2900, -1381, 10, -2791, -1381, 10 ) -- water = createWater ( -3000, -1579, 10, -2891, -1579, 10, -3000, -1381, 10, -2891, -1381, 10 ) water = createWater ( -3100, -1579, 10, -2991, -1579, 10, -3100, -1381, 10, -2991, -1381, 10 ) setWaterLevel ( water, 150 ) if water == false then outputChatBox ( "water fail") else outputChatBox ( "water ok") end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting) the last to are good for see what i mean. IDK why or have i done something wrong
  16. ok now i have understand how that works... function thaResourceStarting( ) WasserBla = createWater ( 1867, -1444, 10, 1968, -1443, 10, 1867, -1372, 10, 1968, -1370, 10 ) setWaterLevel (WasserBla,20 ) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting) that is a good info script for wiki lol
  17. I have try to crate a water area but when i add this script: function waterfun( ) water = createWater ( -2172, 2328, 15, -2146, 2328, 15, -2146, 2307, 15, -2169, 2307, 15 ) -- setWaterLevel ( 10 ) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), waterfun) and is see nothing Then i have try set the water level but then was the water all over gta sa. I wanna add a new water area and not the full map under water. In the meta file have i add client In the wiki is really no help and the example script there is really not helpful So how can i add the water there???? And can someone add some better example for creatwater in wiki!!
  18. Here is a part from my login, register, save system. The problem is that the kick player not work Warning: bad argument @ 'kickPlayer' function registercheck () local namecheckregister = getPlayerName ( source ) checkdbregiser = executeSQLSelect ( "playersave", "playerdb", "playerdb = '" .. namecheckregister .. "'" ) if ( type( checkdbregiser ) == "table" and #checkdbregiser == 0 ) or not checkdbregiser then outputChatBox ( "Your are login as Guest! Use /register", source ) else kickplayertimer = setTimer( kickPlayer, 20000, 1, namecheckregister, source, "register name kick" ) outputChatBox ( "You are a member use /login in the next 20sec!!", source ) end end addEventHandler ( "onPlayerJoin", getRootElement(), registercheck ) Can someone help me here plz?
  19. I work atm on a save system and Scorebord system too for my server. The problem is when i try to load executeSQLInsert over onPlayerLogin nothing save But when i use the same script not over onPlayerLogin everything is fine I wanna check is the player login for save kills... and when the player not login he can play normal with no save. Before i had this login windows from the mta website but i dont like them so i try my way I have try to load my script over /register but there was the same problem like in onPlayerLogin idk why OK here is the problem script: function playerloginsystem ( source ) local namelogin = getPlayerName ( source ) checklogin = executeSQLSelect ( "playersave", "playerdb", "playerdb = '" .. namelogin .. "'" ) if ( type( checklogin ) == "table" and #checklogin == 0 ) or not checklogin then -- see if any data was found at all local userforregister = getPlayerName ( source ) executeSQLInsert ( "playersave", "'" .. userforregister .. "', '2', '2', '2', '2', 'Register', '2'" ) --add the first data in the user table setElementData ( source, "Status", "Register") else -- Data from db to scoreboard for register user readKillsFromdb = executeSQLQuery ( "SELECT Killsdb FROM playersave WHERE playerdb=?", namelogin ) readDeathsFromdb = executeSQLQuery ( "SELECT deathdb FROM playersave WHERE playerdb=?", namelogin ) readPointsFromdb = executeSQLQuery ( "SELECT funpoints FROM playersave WHERE playerdb=?", namelogin ) readMoneyFromdb = executeSQLQuery ( "SELECT money FROM playersave WHERE playerdb=?", namelogin ) readStatusFromdb = executeSQLQuery ( "SELECT statusdb FROM playersave WHERE playerdb=?", namelogin ) setElementData ( source, "Kills", readKillsFromdb[1].Killsdb ) setElementData ( source, "Death", readDeathsFromdb[1].deathdb ) setElementData ( source, "Fun Points", readPointsFromdb[1].funpoints ) setElementData ( source, "Money", readMoneyFromdb[1].money ) setElementData ( source, "Status", readStatusFromdb[1].statusdb ) outputChatBox ("All your data are load! Have fun!", source) end end addEventHandler ( "onPlayerLogin", getRootElement(), playerloginsystem ) I know it is not perfect but easy to understand for me, atm i learn so i try the easy way
  20. I try atm server side and have done that: function omgstart ( source, commandName ) if ( theMarkeromg ) then -- check if the marker was created successfully outputChatBox ("Maker is Already Online!", source, 252, 255, 10 ) else theMarkeromg = createMarker ( -2257, 2330, 5, "cylinder", 1.5, 255, 255, 0, 170, source ) outputChatBox ("Create Maker", source, 252, 255, 10 ) timeromgcount = setTimer(destroyElement, 10000, 1, theMarkeromg) end end addCommandHandler ( "startomg", omgstart ) My qestion is now when 2 or more player have use startomg kill the timeromgcount all Marker from all players or only from the player where is the counter 0? Later i wanna add when the player is in the marker he get money... and work more with the setTimer and killTimer, onMarkerHit, onMarkerLeave. Thats why i ask Its bad when all Marker gone from all players when one setTimer is 0 from one player.
  21. I wanna crate a marker that only the player can see where create it. Create a Marker is easy and that with a command too. But i wanna go sure that only the player can see the marker. Must i add in the meta file the script as client or something like that?
  22. Hi! I wanna make /nick off in my server is there a way for make this off? And how can i make the votemanger off when my sever start? The last one is atm i work with the freeroam script from mta 1.0.5. Is there a way for get the "new" one for mta 1.1 with the new color system... So that i can change everything again for my server and start it on mta 1.1
  23. And here is my create ped script: function pedsexparty1 () pedsex1 = createPed(87, -2225.376953125, 2333.6584472656, 7.546875) setPedAnimation (pedsex1, "STRIP", "STR_C1", -1, true, true, true ) setPedRotation ( pedsex1, 10000 ) pedsex2 = createPed(238, -2225.376953125, 2340.6584472656, 7.546875) setPedAnimation (pedsex2, "STRIP", "STR_B2C", -1, true, true, true ) setPedRotation ( pedsex2, 8000 ) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), pedsexparty1 ) I found out when i have only one ped is that no problem only 2+ crash my game!
  24. HI! I have done a ped script and this script crash my GTA SA! In the server log is no crash only a [Timed out ] when i get an error message from GTA SA. This is the error message: And here is the part where make the crash: function pedcheckweaponped1 ( attacker, weapon, thePlayer ) local px,py,pz = getElementPosition( pedsex1 ) if py > 2334 or py < 2332 then setElementPosition ( pedsex1, 1214.2491699219, -4.9254320144653, 1000.6) end setElementHealth ( pedsex1, 1000 ) setPedAnimation (pedsex1, "STRIP", "STR_C1", -1, true, true, true ) end addEventHandler ( "onClientPedDamage", getRootElement(), pedcheckweaponped1 ) IDK where is the problem here??
  25. yh that was it BIG THX for the help!!! And i hope my little script help other people too with the idle problem That is now a good idle script (i think lol) They must only delete my help text in the chat
×
×
  • Create New...