Jump to content

Alen141

Members
  • Posts

    105
  • Joined

  • Last visited

Everything posted by Alen141

  1. Hey! Thanks for the reply! Well, gamemode complexity really is no issue.. ( I already have an rpg template I made for fun, works really well, but I do not intend to make an rpg [that template was more of a way to learn MTA documentation again, since I didn't use lua nor MTA functions in a long time..] ) the thing I'm worried about is player base and interest in something new or at least bit different approach on old gamemodes :S..
  2. So I've recently came back to MTA, nostalgia I guess, after cringing on my forum posts here, I was wondering maybe I should try and fulfill my childhood dream to have an mta server with my own gamemode, but I honestly don't even know if it's worth my time at this point.. So here I am asking a simple question.. Is it worth it? PS sorry if I posted in the wrong section
  3. Hey there I just wanted to know which functions do I need to use to create a door/gates that open only when certain team tries to enter( I don't want it to open using command )
  4. EDIT : idk if this will work, but maybe using theese, cause as I said not too good with xml nodes : xmlCreateFile xmlNodeSetAttribute
  5. not save it, but "make it" in XML, it makes things alot easier, after making code that allows you to create it in XML you can use alot simpler codes inside XML files as I mentioned before : "Police" position="x,y,z" skin="255" weapon(s)="31"
  6. you got my point, I've got this idea when checking XML in my spawn menu script
  7. Hey guys, I've been working on some simple job script lately but as I don't get xml nodes and stuff too much I can't make it easier for me to create jobs, if I would want to make another job I would have to do the same procedure again and again.. So what I wanted in my xml : <job name = ""(this would be elemnt data that would set "Job") position=""(position of marker) weapons=""(weapon ids ) skin=""(skin he would get) description=""(i guess it's self explanatory) My Police Job scripts : client side : jobWnd = guiCreateWindow(422, 250, 511, 272, "Job GUI v0.1", false) guiWindowSetSizable(jobWnd, false) desc = guiCreateMemo(9, 20, 492, 117, "Description: ....", false, jobWnd) guiMemoSetReadOnly(desc, true) yesbtn = guiCreateButton(64, 215, 156, 47, "Take Job", false, jobWnd) nobtn = guiCreateButton(266, 215, 156, 47, "Cancel", false, jobWnd) quitbtn = guiCreateButton(168, 147, 156, 47, "Quit Job", false, jobWnd) guiSetVisible(jobWnd, false) local jobmarker = createMarker ( 1536.4000244141, -1662.8000488281, 12.5, "cylinder", 1.5, 100, 149, 237, 170 ) function SAPDjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(jobWnd) then guiSetVisible(jobWnd, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", jobmarker, SAPDjob) function closeGUI() if (source == nobtn) then showCursor(false) guiSetVisible( jobWnd, false ) end end addEventHandler("onClientGUIClick",root,closeGUI) function takeJob() if ( source == yesbtn ) then triggerServerEvent("getJob", getLocalPlayer()) guiSetVisible(jobWnd,false) showCursor(false) end end addEventHandler("onClientGUIClick",root,takeJob) function quitJob() if ( source == quitbtn ) then triggerServerEvent("quitJob", getLocalPlayer()) guiSetVisible(jobWnd,false) showCursor(false) end end addEventHandler("onClientGUIClick",root,quitJob) server side : exports.Scoreboard:scoreboardAddColumn( "Job" ) function createCivTeam () Polteam = createTeam ("Police", 100, 149, 237) noTeam = createTeam ("Unemployed", 253, 208, 23) end addEventHandler ("onResourceStart", resourceRoot, createCivTeam) function joinTeam() local playerTeam = getPlayerTeam ( source ) if not playerTeam or playerTeam == noTeam then setPlayerTeam(source,Polteam) setPlayerNametagColor ( source, 100, 149, 237) setElementModel(source, 280) giveWeapon ( source, 3 ) giveWeapon ( source, 23, 200 ) giveWeapon ( source, 26, 200 ) setElementData ( source, "Job", "Officer" ) outputChatBox("#00FF00You are now employed as Police Officer!", getRootElement(), 255, 0, 0, true ) else outputChatBox ( "#FF0000You are already employed, quit your job first!", getRootElement(), 255, 0, 0, true ) end end addEvent("getJob", true) addEventHandler("getJob",root,joinTeam) function quitTeam() local playerTeam = getPlayerTeam ( source ) if (playerTeam == Polteam) then setPlayerTeam(source, noTeam) setPlayerNametagColor ( source, 253, 208, 23 ) setElementModel(source, 0) setElementData ( source, "Job", "Unemployed" ) takeAllWeapons ( source ) outputChatBox("#00FF00You are now Unemployed and all of your weapons were \"taken\"", getRootElement(), 255, 0, 0, true ) else outputChatBox("#FF0000You don't have this job so you can't quit!", getRootElement(), 255, 0, 0, true ) end end addEvent("quitJob", true) addEventHandler("quitJob",root,quitTeam) How to make shorter procedure of creating jobs ?
  8. Hey guys I don't need too much of help, but how to use getElementData to make something similar to this Vehicle lock : paramedic = createVehicle ( 416, 2037.95703125, -1424.1435546875, 17.071420669556 ) function lockMedic ( player, seat, jacked ) if ( source == paramedic ) then ---- I tried everything to define class ---- ---- but can't figure out problem + got no errors ---- if ( class ~= "Paramedic" ) then cancelEvent ( ) outputChatBox ( "Only Paramedics are allowed to use this vehicle!", player, 255, 0, 0, true ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockMedic ) Gangs(class) : function update() for k, v in ipairs(getElementsByType('player')) do local money = getPlayerMoney(v) setElementData(v,"Money",money ) end for g, v in ipairs(getElementsByType('player')) do local gang = getElementData(v,"spawnedAs") or "N/A" setElementData(v,"Class",gang ) end end setTimer(update, 100, 0)
  9. he probably failed at copy/paste
  10. Alen141

    Flying Turismo

    getVehicleType setWorldSpecialPropertyEnabled
  11. simple yet awesome idea
  12. Hey there! I just wanted to ask you guys for idea about my server.. So I've been thinking about it a lot and came to this conclusion : -- Most of the servers try to be RPG and RACE ( and some freeroams ) So I've came to idea to make gamemode that can be played by max of 16 players(recommended) or up.. And here you come! Leave in comment section below what kind of gamemode would you want to see? That means you can tell me features you want in it, what's the point of the gamemode ( example. "Make gamemode where all players must DESTROY THE F***" out of ONE player just came in mind ) RULES : 1. Don't suggest me to make RP/RPG gamemode cause NOT GONNA HAPPEN! 2. Be clear, so I could understand you. 3. Try to come up with FUN stuff. 4. If I chose your idea your name will be in Credits, and you will get Admin slot on server! ( If someone suggested the idea before you.. don't worry you will get idk 100 Points ingame ) And now server is on 24/7 and provided by great host gta-servers.net, currently server is Deathmatch cause I got nothing else to put in Server IP : 151.236.10.100:22005
  13. Hey there! I just wanted to ask you guys for idea about my server.. So I've been thinking about it a lot and came to this conclusion : -- Most of the servers try to be RPG and RACE ( and some freeroams ) So I've came to idea to make gamemode that can be played by max of 16 players(recommended) or up.. And here you come! Leave in comment section below what kind of gamemode would you want to see? That means you can tell me features you want in it, what's the point of the gamemode ( example. "Make gamemode where all players must DESTROY THE F***" out of ONE player just came in mind ) RULES : 1. Don't suggest me to make RP/RPG gamemode cause NOT GONNA HAPPEN! 2. Be clear, so I could understand you. 3. Try to come up with FUN stuff. 4. If I chose your idea your name will be in Credits, and you will get Admin slot on server! ( If someone suggested the idea before you.. don't worry you will get idk 100 Points ingame )
  14. it's possible that he didn't set type="client" in meta
  15. try something silly.. if this dosen't work, maybe your coords aren't alright : addEventHandler("onClientResourceStart", resourceRoot, function() end ) addEventHandler("onClientRender", root, function () dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end )
  16. You didn't change anything there... the same code. it should work anyway ( one or another ).. Once I had same problem, but when I changed code to this it worked
  17. addEventHandler("onClientRender", root, function () dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end )
  18. Alen141

    XML Files

    ty, this was actually very helpful
×
×
  • Create New...