Jump to content

tosfera

Members
  • Posts

    1,193
  • Joined

  • Last visited

Everything posted by tosfera

  1. 30403 is the texture ID of the helm, you need the Model ID to get that fixed I guess. Vehicle's do have the same ID's but clothes etc doesn't. I replaced a necklace with a flower band for a hawai party a few weeks ago.
  2. Why dont you change the checkTeam function so it accepts 2 parameters, would make it alot easier in further scripting; function checkTeam( thePlayer, theTeam ) return getTeamName (getPlayerTeam ( thePlayer )) == theTeam; end All you have to do is change these lines; if not checkTeam(thePlayer) then return; end to this; if not checkTeam( thePlayer, "" ) then return; end
  3. tosfera

    This ID.

    You want it as a vehicle or as an object? ._.'
  4. You can use a few different ways; addEventHandler("onClientMarkerHit", MARKER_NAME, function() -- todo end ); Using that way, you've to create the function everytime, over and over again for all your markers. To make it alittle more simple you can add an if-statement in it; addEventHandler("onClientMarkerHit", root, function ( source ) if ( source == MARKER_NAME ) then elseif ( source == MARKER_NAME2 ) then end end ); I'm not sure if Lua has a switch-case system built in. If it does, it would be a great way to use it!
  5. Why dont you just use the example they gave on the wiki? policeVehicles = { [598]=true,[596]=true,[597]=true,[599]=true } policeSkins = { [280]=true,[281]=true,[282]=true,[283]=true,[284]=true,[285]=true,[286]=true } function enterVehicle ( player, seat, jacked ) --when a player enters a vehicle if ( policeVehicles[getElementModel(source)] ) and ( not policeSkins[getElementModel(player)] ) then --if the vehicle is one of 4 police cars, and the skin is not a police skin cancelEvent() outputChatBox ( "Only policeman can enter police cars!", player ) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) --add an event handler for onVehicleStartEnter source: https://wiki.multitheftauto.com/wiki/On ... StartEnter
  6. Okee so this is realy yours? Let me point you some things out; local playerID = exports.server:playerID( source ) -- gets information out of a MySQL database local weed = getAccountData(sourceAccount, "Weed") -- getAccountData -> gets information from the built-in account system, plus you haven't defined the sourceAccount. Which has to be an account element. addEventHandler ( "onPlayerLogin", root, asd1 ) -> local steroids = getElementData(source,"Steroids") -- how the hell can you get data of an element that hasn't received any data yet or has any information cause its not an element yet... local theDrug = exports.mysql:querySingle( "SELECT * FROM drugs WHERE id = '" .. playerID .. "'" ) -- the fck is this? ID's dont need qoutes around them, its an Interger and not a string. addEventHandler("onPlayerLogin", root, -- you have no idea what you're doing. You got a duplicated function... So to say it once again, or you have no idea what you're doing or its a leaked script that has been modified by someone without basic programmings knowledge.
  7. Why dont you just add 1 point to the Z-index from the saved data, or add 1 point to the account? addEventHandler("onPlayerQuit", root, function ( source ) local account = getPlayerAcocunt ( source ); if ( acount ) then local x, y, z = getElementPosition ( source ); setAccountData ( account, "Pos-X", x ); setAccountData ( account, "Pos-Y", y ); setAccountData ( account, "Pos-Z", z + 1 ); end end );
  8. Making a shop with your idea can work. The only dangerous thing that you are facing is that when people are selling their item's and 2 people buy 1 item at the same time with a total stock of 1... it will be dupe-able. If you dont protect it.
  9. If its yours, why are you getting account data from the XML files out of the built-in user system? You are getting the userID out of a mysql database, and saving it into it. but you are retrieving unsaved data out of an XML? You sir, have no idea of what you're doing.
  10. Looks like the one from CIT, same names, same way of making script... Not sure about this one xXMADEXx.
  11. I can tell that you'd not write everything yourself, cause these 2 lines are copied out of another login script thats on the community. triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password) else triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password)
  12. My way of thinking would be; create a colshape and attach it to your head, if any user enters the colshape, use the dxdraw above your head. You can see a similar thing in the house system from DaKilla at the community. Sec I'll search the source. edit; source can be found here: https://community.multitheftauto.com/index.php?p= ... ils&id=727
  13. tosfera

    Billboards

    Ahh now I see, it are shaders an it just isn't an object out of the gta3.img, that kinda solved my problem and my way of thinking! Thanks alot! Just one more thing, where did you find the right name?;o in the gta3.img or the other .img file?
  14. tosfera

    Billboards

    Hey, Could anyone explain me how these advertisement boards work? I've been trying to figure it out for the past 36 minute's but its kinda,,, a mess if you ask me. So there is an object; billbrdlan2_05. There is only a .dff file from that one, and from the _01, _02, _03 etc. Now, there is 1 .txd file called; billbrdlan2.txd, in this file there are 3 or 4 differen't image files from 32x16 pixels. My question is, does the billboard take 1 randomly out, does it expand to the right size, is there another trick going on here? Cause I'd like to replace these image's with some other advertisements. :3 thanks.
  15. This did actually work, thanks! addEventHandler("onPlayerChangeNick", getRootElement(), function() cancelEvent(); end );
  16. This did actually work, thanks! addEventHandler("onPlayerChangeNick", getRootElement(), function() cancelEvent(); end );
  17. Hey, Is there anyway to prevert people from changing their name? I've made it so far that they are being kicked for using the /nick command. so I was like; they can't change it now! and just a few mins later some1 changed it in their mta settings and had another name without reconnecting... I'd like to block all the ways to change your name. thanks!
  18. GTA sa doesn't start standalone either, guess I've to do something with my drivers. n_n
  19. I got it enabled, do I have to disable it?
  20. hey guys, since I dont always got people to test stuff with I'm trying to create a virtualbox that runs another mta client for me. But it doesn't start up, its showing the 'stop playing with yourself' image, but nothing else happens after. mtadiag gave me this pastebin; http://pastebin.com/W1qYR3mG Thanks!
  21. Nope, all I did was launching a update query. Should I use dbPoll to just reset it? n_n
  22. hey guys, I'm not sure if its of any danger or so, but I'm working with dbQuery. I'm saving data into a database and blah blah, aint that important. But when ever I launch an update query I'll get this info-message in my console; Database result uncollected after 5 minutes Is it dangerous? do I have to fix it?
  23. Finally! A reply! Anyway, I always thought that the accounts were stored in XML files? O_O Anyway, does the built-in db from MTA also saves user-ID's? Or just the serial cause if they do save the user-id's I'll just request all the data(after I saved it the same way) with the user_ID or serial. if thats possible?
  24. Hey guys, I'm trying to base my entire project on a database but I'm walking against a problem right now. I already wrote a function to see if its an existing account, but to use the logIn function. You need to use the getAccount to get an account back for argument 2. But if they create an account, it gets saved into my MySQL. Is there anyway to return an account element from a db? Sofar I got this; Server: addEvent("isValidPlayer", true); addEventHandler("isValidPlayer", root, function(username, email, password) openMysql() local queryUserLogin = dbQuery( db, "SELECT * FROM users WHERE Users_Password = ? AND Users_Username = ?", password, username); local resultUserLogin = dbPoll( queryUserLogin, -1 ) for index, user in ipairs ( resultUserLogin ) do logPlayer(user.Users_Username, user.Users_Password); end closeMysql() end); function logPlayer(username, password) logIn(source, username, password); end easy client stuff; function clientSubmitLogin() local username = guiGetText(txt_username); local email = guiGetText(txt_username); local password = guiGetText(txt_password); triggerServerEvent("isValidPlayer", getLocalPlayer(), username, email, password); end
  25. Why the hell,,, you want to set data to each player just to check if its a zombie or not? Zombies most likely have a skin, like the hobo one or something. If thats true in his situation, just let him check the skin and see if its a zombie or not. Way faster and a cleaner code. :3 Zombies can have any skin that there scripted for, and this code isn't really messy... Thats true, but most likely they have one skin. IF they dont, your idea is the best way to solve it. but if they do, its just a matter of getElementModel.
×
×
  • Create New...