Jump to content

John Smith

Members
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by John Smith

  1. hi i wrote this code function addPlayerInTeam(player,cmd,targetElement,team,rank) if exports.admin:isPlayerAdmin(player) then if not team then outputChatBox("[/setplayerteam] team is missing at argument 2!",player,255,0,0) return end if not rank then outputChatBox("[/setplayerteam] rank is missing at argument 3!",player,255,0,0) return end local targetElement = getPlayerFromName(targetElement) if targetElement then local isPlayerInClan = dbExec(database,"SELECT * FROM "..team.." WHERE memberSerial=?",getPlayerSerial(targetElement)) if not isPlayerInClan then local result = dbExec(database,"INSERT INTO "..team:lower().." ( memberName, memberSerial, memberRank ) VALUES (?,?,?)",getPlayerName(targetElement):gsub("#%x%x%x%x%x%x",""),getPlayerSerial(targetElement),rank) outputChatBox("Transferring player to sql database into "..team.." team...",player,0,0,255) outputChatBox("Result: "..tostring(result)) else outputChatBox("WARNING! Player is already in that clan!",player,255,0,0) end else outputChatBox("[/setplayerteam] player not found.",player,255,0,0) end end end addCommandHandler("setplayerteam",addPlayerInTeam) i am pretty new at sql and i didnt know any other way to check if something exists rather than SELECT * FROM something WHERE memberSerial=?,serial please help if you know sql
  2. As far as i know zip files are automatically extracted to the folder with same name when running the resource
  3. If he'd do that, he would get what he didnt want: Every hydra would have custom texture
  4. Thanks Backflip for giving me one more reason why to leave this forum.
  5. Maky then his example should work He has to start the resource and reconnect On the image he shown this code didnt execute nor it outputted text which means that he either didnt reconnect or the resource did not start (correctly)
  6. fadeCamera(source,true) It clearly explains on scripting introduction page that you need this, otherwise screen will be black.
  7. Afaik it shouldnt because comments are part of lua;code
  8. No offense but the person who would be so dumb that he/she couldnt install mta by himself/herself also wouldnt even come here Its okay as tutorial but i dont think that theres a point of it
  9. hi umm i know that animations such as like fade outs/ins can be done with interpolateBetween but i wonder how to make some kind of notification system like this you got some notifications and after 3 secs after a specific line has been shown, the line fades out line 1 line 2 line 3 line 4 then when line 1 is faded out those 3 lines more 1 line above in animation style how do people make this stuff, full of animations, and for each line there's specific "lifespan" ?
  10. oh thanks for this tutorial, i forgot how to install mta and you saved my life. is this a joke?
  11. There is a bug with peds having that(enter_exit) control state Bug has been reported somewhere on bugs.mtasa.com
  12. that will just increase font size, and for me it would bug out with the thing im working with(because font size would be too big) ...
  13. hi i am using dx functions as almost every scripter and i ran into a problem due to scale(i guess) on lower resolutions quality of font is being lost i'm scaling font like this sw,sh = guiGetScreenSize() local scaleX,scaleY = 1/1920*sw, 1/1080*sh dxDrawText(...,scaleX,scaleY,...) and basically on my resolution (1920x1080) font is basically in HD, while on lower resolutions such as 1366x768 quality is completely ruined. how can i fix this problem?
  14. Yes, if somebody is faking/copying your server name, you can report it to that topic. However, (just saying) scripts are your responsibility as Ransom said in here: viewtopic.php?f=91&t=54447 So in case your scripts get stolen, you can't do much about it.
  15. there's only this topic viewtopic.php?f=114&t=31463
  16. for mta scripting you need to learn Lua here's a topic with few links of tutorials in lua viewtopic.php?f=148&t=40809 also check wiki.multitheftauto.com
  17. outputChatBox has latest argument which can be true/false use 'true' if you want color codes e.g -- server side outputChatBox("a #FFFFFFmessage!",root,255,0,0,true) -- true makes it color coded --client side outputChatBox("a #FFFFFFmessage!",255,0,0,true) -- true makes it color coded
  18. instead of creating your own script, faster way is to edit joinquit resource path: mta directory\server\mods\deathmatch\resources\[gameplay]\joinquit
  19. onVehicleExit can't be canceled. though you can reverse it
  20. its impossible to keep player in car, only possible thing u could do is fake it but it wont look real, try suggesting this as feature on mantis(feature to block player getting out) [but i believe that that request would be ignored like other ones since it's not a bug, but a request, and they're busy]
  21. Youre missing an argument of weapon in function associated with onclientplayerweaponfire To triggerserverevent add 3rd argument ,weapon And then add an argument in serverside function and then reloadpedweapon with that argument If you do this, code will execute just fine
  22. We don't give support with leaked scripts.
  23. not sure but try to get origin(source) from onDebugMessage
  24. as far as i see, he didn't say that it's bad or anything, but that he is curious how has TfF Server hidden the watermark with their hide-all-interface bind(F2)
×
×
  • Create New...