-
Posts
6,089 -
Joined
-
Last visited
-
Days Won
216
Everything posted by IIYAMA
-
http://bugs.mtasa.com/view.php?id=6639 exactly..... -_-"
-
I am building something that gives ammo when you are inside a colshape, but the Flamethrower ammo is getting bugged all the time. It jumps from 200 to 23 and back to 153 etc... of course I put a limit on it, but this jumping behaviour is getting very annoying because the clip ammo is also changing a lot. function setPlayerBoxAmmo (player,weaponSlot) local ammoIn = getPedTotalAmmo (player,weaponSlot) local weapon if groupweapon then local weaponset = getElementData(player, "weaponSet") if weaponset then weapon = groupweapon[weaponset][weaponSlot] outputChatBox(weapon .. "weaponslot" .. weaponSlot .. ammoIn) else return end else weapon = getPedWeapon ( player, weaponSlot ) end local ammoLimit = MXammo[weapon] if ammoIn == ammoLimit then return end outputDebugString("ammotrigger") local ammoCont = ammoIn+ammoGiving[weapon] local clip = tonumber(slotForce[weapon]) or 0 if ammoCont > ammoLimit then if ammoIn <= 0 then giveWeapon ( player, weapon, ammoLimit, false ) else --outputChatBox("ammoIn ".. ammoIn) setWeaponAmmo ( player, weapon, ammoLimit, clip) end else if ammoIn <= 0 then giveWeapon ( player, weapon, ammoCont, false ) else if ammoCont > ammoLimit then --giveWeapon ( player, weapon, ammoLimit - ammoIn, false ) setWeaponAmmo ( player, weapon, ammoLimit, clip) else --giveWeapon ( player, weapon, ammoIn+10, false ) setWeaponAmmo ( player, weapon, ammoCont, clip) end end end end Somebody a suggestion, idea's or explanation?
-
Thank you very much ! I probably forgot to put the export in the mta
-
Somebody have any idea what can go wrong?
-
local groupSlots = call(getResourceFromName("SPY-vs-SPY"),"onWeaponInfoRequest") function onWeaponInfoRequest() return weaponsFromSet end I am doing something wrong?
-
or you just download a clean one: http://pastebin.com/HWJ308YZ
-
I use hedit to import/(export) my handlings, but it won't support the whole file in ones. https://community.multitheftauto.com/in ... ls&id=3716
-
Mind also the ranks under the admin, some of the rights also count for admins. <acl name="Admin"> <right name="general.ModifyOtherObjects" access="true"></right> <right name="general.http" access="true"></right> <right name="command.shutdown" access="true"></right> <right name="command.install" access="true"></right> <right name="command.aexec" access="true"></right> <right name="command.debugscript" access="true"></right> <right name="command.upgrade" access="true"></right> <right name="command.crun" access="true"></right> <right name="command.srun" access="true"></right> <right name="command.run" access="true"></right> <right name="function.addBan" access="true"></right> <right name="function.removeBan" access="true"></right> <right name="function.reloadBans" access="true"></right> <right name="function.executeCommandHandler" access="true"></right> <right name="function.setServerPassword" access="true"></right> <right name="function.getServerPassword" access="true"></right> <right name="function.createResource" access="true"></right> <right name="function.copyResource" access="true"></right> <right name="function.addResourceMap" access="true"></right> <right name="function.addResourceConfig" access="true"></right> <right name="function.removeResourceFile" access="true"></right> <right name="function.setResourceDefaultSetting" access="true"></right> <right name="function.removeResourceDefaultSetting" access="true"></right> <right name="function.aclReload" access="true"></right> <right name="function.aclSave" access="true"></right> <right name="function.aclCreate" access="true"></right> <right name="function.aclDestroy" access="true"></right> <right name="function.aclSetRight" access="true"></right> <right name="function.aclRemoveRight" access="true"></right> <right name="function.aclCreateGroup" access="true"></right> <right name="function.aclDestroyGroup" access="true"></right> <right name="function.aclGroupAddACL" access="true"></right> <right name="function.aclGroupRemoveACL" access="true"></right> <right name="function.aclGroupAddObject" access="true"></right> <right name="function.aclGroupRemoveObject" access="true"></right> <right name="function.refreshResources" access="true"></right> <right name="function.setServerConfigSetting" access="true"></right> <right name="function.updateResourceACLRequest" access="true"></right> <right name="command.aclrequest" access="true"></right> <right name="general.adminpanel" access="true"></right> <right name="general.tab_players" access="true"></right> <right name="general.tab_resources" access="true"></right> <right name="general.tab_server" access="true"></right> <right name="general.tab_maps" access="true"></right> <right name="general.tab_bans" access="true"></right> <right name="general.tab_adminchat" access="true"></right> <right name="command.kick" access="true"></right> <right name="command.freeze" access="true"></right> <right name="command.mute" access="true"></right> <right name="command.setnick" access="true"></right> <right name="command.shout" access="true"></right> <right name="command.spectate" access="true"></right> <right name="command.slap" access="true"></right> <right name="command.setgroup" access="true"></right> <right name="command.sethealth" access="true"></right> <right name="command.setarmour" access="true"></right> <right name="command.setmoney" access="true"></right> <right name="command.setskin" access="true"></right> <right name="command.setteam" access="true"></right> <right name="command.giveweapon" access="true"></right> <right name="command.setstat" access="true"></right> <right name="command.jetpack" access="true"></right> <right name="command.warp" access="true"></right> <right name="command.setdimension" access="true"></right> <right name="command.setinterior" access="true"></right> <right name="command.createteam" access="true"></right> <right name="command.destroyteam" access="true"></right> <right name="command.givevehicle" access="true"></right> <right name="command.repair" access="true"></right> <right name="command.blowvehicle" access="true"></right> <right name="command.destroyvehicle" access="true"></right> <right name="command.customize" access="true"></right> <right name="command.setcolor" access="true"></right> <right name="command.setpaintjob" access="true"></right> <right name="command.listmessages" access="true"></right> <right name="command.readmessage" access="true"></right> <right name="command.listresources" access="true"></right> <right name="command.start" access="true"></right> <right name="command.stop" access="true"></right> <right name="command.stopall" access="false"></right> <right name="command.delete" access="true"></right> <right name="command.restart" access="true"></right> <right name="command.execute" access="true"></right> <right name="command.setpassword" access="true"></right> <right name="command.setwelcome" access="true"></right> <right name="command.setgame" access="true"></right> <right name="command.setmap" access="true"></right> <right name="command.setweather" access="true"></right> <right name="command.blendweather" access="true"></right> <right name="command.setblurlevel" access="true"></right> <right name="command.setwaveheight" access="true"></right> <right name="command.setskygradient" access="true"></right> <right name="command.setgamespeed" access="true"></right> <right name="command.setgravity" access="true"></right> <right name="command.settime" access="true"></right> <right name="command.setfpslimit" access="true"></right> <right name="function.shutdown" access="true"></right> <right name="command.ban" access="true"></right> <right name="command.unban" access="true"></right> <right name="command.banip" access="true"></right> <right name="command.unbanip" access="true"></right> <right name="command.banserial" access="true"></right> <right name="command.unbanserial" access="true"></right> <right name="command.listbans" access="true"></right> </acl>
-
alles in: cp_core_server.lua (vergeet niet een backup te maken)
-
ah thank you!!! local functionTable = {} addCommandHandler("hey", function (player,cm) lol = functionTable[1] lol() end) functionTable[1]=function() outputChatBox("hey") end functionTable[2]=function() outputChatBox("hoi") end functionTable[3]= function() outputChatBox("hi") end
-
Is it possible to store triggers in tables? Because this isn't working. local functionTable = {hey,hoi,hi} addCommandHandler("hey", function (player,cm) lol = functionTable[1] lol() end) function hey() outputChatBox("hey") end function hoi() outputChatBox("hoi") end function hi() outputChatBox("hi") end
-
Table is een rij met waardes. Het word gebruikt om informatie op te slaan, te laden of mee te controleren. myTable = {5,4,"hey!",2,1} -- de informatie die deze table bevat. --outputChatBox() <-- laat informatie achter in de chatbox -- waarde = myTable[ positie van het getal ] outputChatBox(myTable[1]) -- nu pakken we het eerste getal in de table en dat is 5, dat laten we nu in de chatbox zien. "5" outputChatBox(myTable[2])--"4" outputChatBox(myTable[3]) -- en nu komen we er achter dat dit op de 3de plaats bevind. "hey!" meta.xml Is je script launcher, dit stukje code zorgt voor het opstarten van je scripts die zich in folder bevinden. Maar ook voor het vinden van beeld materiaal/plaatjes, auto mods of geluid. Het is een soort inhoudsopgaven die de server nodig heeft om bestanden te vinden. Of het kan ook informatie zijn die voor settings word gebruikt.
-
Kan ik begrijpen Het is ook lastig te begrijpen als je deze taal niet begrijpt.
-
Probeer maar in cp_core_server.lua en zet dat in client side uit: (op deze manier) --[[ createTeam ... function () end ]]
-
nee cp_core_server.lua omfg client.... Probeer dat maar in het script cp_core_server.lua Ik weet alleen niet of de export wel gaat lukken.
-
Als goed is alles in de server side .lua File: cp_core_server.lua local botSpawns1 ={}-- boven aan local botSpawns2 ={}-- boven aan function startupMap(map,spawnPlayers) -- deze bestaat al -- -- -- -- -- botSpawns1 = getElementsByType("bluspawn") botSpawns2 = getElementsByType("redspawn") -- end-- natuurlijk deze ook addEventHandler("onGamemodeMapStart",getRootElement(),startupMap) -- en de deze.... Waar bevind zich dit? Want dit script heeft wel de benodigde spawnpoints gevens nodig. local enemyTeam = createTeam ("Delta",255, 0,0 ) addCommandHandler ( "spawnbot", function ( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) local thisSpawn if math.random(1,2) == 1 then thisSpawn = botSpawns1[math.random(1, #botSpawns1 )] else thisSpawn = botSpawns2[math.random(1, #botSpawns2 )] end exports [ "slothbot" ]:spawnBot ( getElementData(thisSpawn, "posX"), getElementData(thisSpawn, "posY"), getElementData(thisSpawn, "posZ"), 0, 121, getElementInterior (thePlayer), getElementDimension (thePlayer), enemyTeam, 31, "hunting") end )
-
Nope, het staat buiten de bot spawn functie. Maar voor de zekerheid: (als je de gamemode stopt) addEventHandler("onResourceStop", resourceRoot, function () local team = getTeamFromName ("Delta") if isElement(team) then destroyElement (team) outputDebugString ("Team: Delta has been destroyed.") end end)
-
Well in the past it did, maybe the script disabled it or have been stopped/removed/debugged in the new versions.
-
je zult het er toch zelf in moeten zetten --tables-- (boven aan) local botSpawns1 ={} local botSpawns2 ={} ------------ -- voeg deze toe aan onGameModeStart >function< -- function () for i,spawn in pairs(getElementsByType("bluspawn")) do table.insert(botSpawns1,spawn) end for i,spawn in pairs(getElementsByType("redspawn")) do table.insert(botSpawns2,spawn) end -- en misschien gaat het zo ook nog wel. OF het een of het ander, niet >EN< botSpawns1 = getElementsByType("bluspawn") botSpawns2 = getElementsByType("redspawn") -- end --------------------------------------------------- local enemyTeam = createTeam ("Delta",255, 0,0 ) addCommandHandler ( "spawnbot", function ( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) local thisSpawn if math.random(1,2) == 1 then thisSpawn = botSpawns1[math.random(1, #botSpawns1 )] else thisSpawn = botSpawns2[math.random(1, #botSpawns2 )] end exports [ "slothbot" ]:spawnBot ( getElementData(thisSpawn, "posX"), getElementData(thisSpawn, "posY"), getElementData(thisSpawn, "posZ"), 0, 121, getElementInterior (thePlayer), getElementDimension (thePlayer), enemyTeam, 31, "hunting") end )
-
Dus dan in het handig om een vijandig team te creëren. en deze locatie te bepalen waar hun spawnen. local enemyTeam = createTeam ("Delta",255, 0,0 ) addCommandHandler ( "spawnbot", function ( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) exports [ "slothbot" ]:spawnBot ( x, ( y + 1 ), z, 0, 121, getElementInterior (thePlayer), getElementDimension (thePlayer), enemyTeam, 31, "hunting") end ) Hier is de locatie nog steeds het zelfde. Maar wel vijandig team. Met deze skin. Om de locatie goed te bepalen zou je de namen van de spawnpoints moeten pakken in. --tables-- local botSpawns1 ={} local botSpawns2 ={} ------------ for i,spawn in pairs(getElementsByType("bluspawn")) do table.insert(botSpawns1,spawn) end for i,spawn in pairs(getElementsByType("redspawn")) do table.insert(botSpawns2,spawn) end thisSpawn = botSpawns1[math.random(1, #botSpawns1 )] thisSpawn = botSpawns2[math.random(1, #botSpawns2 )] getElementData(thisSpawn, "posX") getElementData(thisSpawn, "posY") getElementData(thisSpawn, "posZ")
-
probeer dit is: addCommandHandler ( "spawnbot", function ( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) exports [ "slothbot" ]:spawnBot ( x, ( y + 1 ), z, getPedRotation (thePlayer), getElementModel (thePlayer), getElementInterior (thePlayer), getElementDimension (thePlayer), getPlayerTeam (thePlayer), 31, "hunting") end ) Het is een beetje in elkaar gedrukt, maar zo zou ik het weg schrijven. Weinig los lopende data die direct word verwerkt in de export. + skin + team
-
Ik kan wel scripten ja. Als je maar niet te ingewikkelde script's vraagt, want ik daar heb ik niet veel tijd voor.
