Jump to content

Tockra

Members
  • Posts

    105
  • Joined

  • Last visited

Everything posted by Tockra

  1. Thank you that is a nice idea I will test it €: I have one problem i dont understand what getTimestamp() return... I would test it and used this : http://www.pastebay.com/102263 But i get this error: attempt to call global getTimestamp (a nil value)
  2. Serverside is it badder for the performance, when the server loop every secound all players...
  3. i have a variable for every player where will every secound added +1 ...
  4. If i make the timer server site it is badder for the performance then when i use setElementData every secound...
  5. Yes that would run but i want not use it because every secound the variable get +1 and when for every player set every secound his Element Data, it isnt so good for the serverperformance, because setElementData saved the Element Data on the server (i think)!?...
  6. I mean onClientResourceStop... And say not no i tested it. I included in this event outputChatBox("Test") . And when i disconnected i could read "test" in my console...
  7. The variables are saved client site, because i have there a timer for better performance... onRessourceStop run when i quit the server... onClientPlayerQuit dont run client site because "This event is triggered when a remote player quits the game or leaves the server. It will not get triggered on the source player's client."
  8. Hello Guys... i have one problem in my script. My script want not trigger a serversite event onClientResourceStop: --Clientsite: function onPlayerQuit() GKtest = 0 --setElementData(getLocalPlayer(),"Bank[GKCrTime]",GKCrTime) triggerServerEvent( "playerDis", getLocalPlayer() ,GKCrTime,GKtest ) --GKCrTime is defined (its an numbered value between 1 and 2700) end addEventHandler("onClientResourceStop",getRootElement(),onPlayerQuit) --The Event: function quitPlayer(GKTime,SBTime) print("Test") local saved = mysql_query(Datenbank,"UPDATE `bankkonten` SET `GKCrTime`='"..tostring(GKTime).."',`SBCrTime`='"..tostring(SBTime).."',`GKAKT`='"..tostring(getElementData(source,"Bank[GKAKT]")).."',`SBAKT`='"..tostring(getElementData(player,"Bank[sBAKT]")).."' WHERE `Benutzername`='"..getPlayerName(source).."'") end addEvent("playerDis",true) addEventHandler("playerDis",getRootElement(),quitPlayer) But when i left the player, the script dont save the datas in the mysql table and it dont print "test" ... I dont know why but the Server Site event will not triggered... I have no idea why
  9. Tockra

    Radio Bug

    But its a bug ^^ I think before the devloopers include new functions in the new mta version, they should fix the bugs, because bugs are badder for peaple then an function, which isnt there...
  10. Tockra

    Radio Bug

    Hello Guys, i love mta but i have one little problem with it. I hate the Radio bug... Evers when i change the radio wave and go back to my own music wave the radio skip a big part of the current song or when i play race or dd or dm and when i drive in a vehicle change pickup and the vehicle change the radio change the current song or skip a big part of the current song too... Will this bug be fixxed in future?
  11. Hi, I have a question... First i want not know how i can create objects, i want to know how i can create 3d models for mta... I have also some questions: 1. Can i create own models for objects ? (not for cars) If yes, how? 2. How can i create own car Models? 3. How can i change the Texture off exist objects in MTA? 4. Can i use own playerskins and own weapons skins?
  12. The same site i had but how can i say the bot he shall drive normal (without left or right) ?
  13. When you now say which commands of setPedControlState i need to use ...
  14. Funny i read all ped commands and have no idea how i can make waypoints for the bots to which they evers drive...
  15. Hello Guys, i have got 3 questions... 1. I binded a function on enter, which run when the player is on a special point. Now i want not that the player enter an vehicle, when he is on this special position. How can i cancel it? 2. How can i let a bot drive an vehicle in a loop ab special route ? Must i make this with waypoints and let the Bots drive to the waypoints? How can i make it? 3. I want that the courser will show when i press alt GR down and it should be unshown when "press" altGR up here is my code (its client site) but it dont run : http://pastebay.com/98796
  16. Hello Guys, i want to ask, which Linux Version run with MTA Sa? (32 or 64) (SusE, or Debian, ...) ?
  17. Thank you... I have now a idea how i can count the actual axis, but for it i must order the indicator at regular intervals but i dont know how i can make thats. I know only, that i can set them with the gui editor, but so i cant order it in regular intervals...
  18. download and look how it's done .. you will do it same way anyway.. Yes i know but I am inclined to copy parts ^^ And i need a little instruction
  19. Hi guys, i want know, how i can make a speedometer (clock). And how can i get the currently moving speed? I know, that i can download a resource for it already but i want to make my own...
  20. Tockra

    Mysql help

    okey thx for your help, i found my failor. I used ´´ but i must use `` here is the running code: http://pastebay.com/97525 So new problem, the elements will not set. In my mysql Tabel i have the Value 1 by level but if i show the getPlayerElementData(player,"Level") later in the script it give nil back... Here set the element: local result = mysql_query(Datenbank, "SELECT `Autoschein` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Autoschein", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Bootschein` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Bootschein", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Flugschein` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Flugschein", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Motorradschein` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Motorradschein", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Angelschein` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Angelschein", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Waffenschein` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Waffenschein", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Leader` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "fLeader", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `GeldH` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "GeldH", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `GeldB` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "GeldB", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Adminlevel` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Adminlevel", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Level` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Level", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Geschlecht` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Geschlecht", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Geburtsdatum` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Geburtsdatum", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result) local result = mysql_query(Datenbank, "SELECT `Fraktion` FROM `benutzertabelle` WHERE `Benutzername`='"..nick.."'") setElementData( playerid, "Fraktion", tonumber(mysql_fetch_assoc(result)) ) mysql_free_result(result)
  21. Tockra

    Mysql help

    post your code then, so we can look into your problem.. and what is PlayerElementData ? getElementData/setElementData i think.. i think you have to learn lua more before you will start with databases I had something scripted, when i asked the question I asked because i dont knew how i can do it... Now i have http://pastebay.com/97446 in my onPlayerJoin event, but i get an mysql error for the mysql_fetch_assoc line... What is wrong in my script ?
  22. Tockra

    Mysql help

    Hello, i hope i can writte my question understandable. I created an login system. When the player is loggined his for example: PlayerElementData(..."car"...) Shall change to the Value, which is in an mysql Table in the line by "car" where ´Nickname´='name...' I hope you understand all and you can help me.
  23. Hi Guys, i want make a resource, where should be checked if the player Serial of the current Player is in a mysql table, if it isnt there should be a message and the serial will be include in the mysql table if it is there should be come a message... Here my resource : http://pastebin.com/bYDwAfXq
  24. okey then tell me how i can find an good example in the wiki, because i have no idea how i can make it, because this i ask you ^^
  25. real? I have no idea how. Your example is a little bit emptyy.
×
×
  • Create New...