Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. You must be kidding me... Why don't you try it first yourself? If it is wrong I will correct you.
  2. local money = getPlayerMoney(player) if money >= 50000 then else-- not enough money outputChatBox("......",player) end
  3. np. I hope you learned something from it.
  4. See my last post.
  5. addCommandHandler ( "setplayergravity", setPlayerGravity ) addCommandHandler ( "setplayergravity", consoleSetPlayerGravity )
  6. Is the system working per player or global? This is per player: local damageProofPlayers = {} function random1(playerSource) damageProofPlayers[playerSource] = true local vehicle = getPedOccupiedVehicle(playerSource) if vehicle then setVehicleDamageProof(vehicle,true) end end function random2(playerSource) damageProofPlayers[playerSource] = nil local vehicle = getPedOccupiedVehicle(playerSource) if vehicle then setVehicleDamageProof(vehicle,false) end end addEventHandler("onPlayerQuit",root, -- clean memory function () if damageProofPlayers[source] then damageProofPlayers[source] = nil end end) function vehicleEntry (playerSource) if damageProofPlayers[playerSource] then setVehicleDamageProof(source,true) end addEventHandler ("onVehicleEnter", root, vehicleEntry)
  7. function carGodMode(vehicle,playerSource) ---i have my functions here which i cant post -- example = if true then return true end return false ------------ end function carNoGodMode(vehicle,playerSource) ---i have my functions here which i cant post -- example = if true then return true end return false ------------ end function vehicleEntry (playerSource) if carGodMode(source,playerSource) then setVehicleDamageProof(source,true) elseif carNoGodMode(source,playerSource) then setVehicleDamageProof(source,false) end end addEventHandler ("onVehicleEnter", root, vehicleEntry)
  8. You can try something like this, edit it like you want. client local connectionOverFlowLimiter = 0 local validBodyParts = {[5]=true,[6]=true} addEventHandler ( "onClientPlayerDamage",localPlayer, function (attacker, weapon, bodypart) if attacker and attacker ~= localPlayer then -- optional if not validBodyParts[bodypart] then cancelEvent() else local newHealth = getElementHealth(localPlayer)-50 if newHealth > 0 then setElementHealth(localPlayer,newHealth) elseif getTickCount() > connectionOverFlowLimiter then -- recommendation. triggerServerEvent("onCustomPlayerWasted",localPlayer,attacker, weapon, bodypart) connectionOverFlowLimiter = getTickCount()+50-- time now + 50 ms toggleAllControls (false,false,true) end end end end) addEventHandler("onClientPlayerSpawn",localPlayer, function () toggleAllControls (true,true,true) end) server addEvent("onCustomPlayerWasted",true) addEventHandler("onCustomPlayerWasted",root, function (attacker,weapon,bodyPart) if client == source and isElement(source) then killPed(source,attacker,weapon,bodyPart) end end)
  9. IIYAMA

    Skin bug

    [color=#B1B100]math.arrogant[/color]
  10. IIYAMA

    Skin bug

    "When I change my skin, my health returns to 100 or 200. Can somebody help me with this?" Is that what you want to say? local health = getElementHealth(player) setElementModel(player,61) setElementHealth(player,health)
  11. There is a table in the serverside file which is generated next to your .map file. It contains the required lowLOD data you requested.
  12. np.
  13. Then you got the wrong line. Something wrong with your text editor?
  14. F11 map probably can only be changed by the user itself. (replacing files in his own mta folder) For the radar > You could try to find the texture name/names: https://wiki.multitheftauto.com/wiki/Sha ... ture_names and apply this simple shader: //-- Declare the texture. These are set using dxSetShaderValue( shader, "Tex0", texture ) texture Tex0; technique simple { pass P0 { //-- Set up texture stage 0 Texture[0] = Tex0; //-- Leave the rest of the states to the default settings } } https://wiki.multitheftauto.com/wiki/En ... rldTexture
  15. Don't ask me why it gives that error, since it should not give you that one on that line... Yet, this is/was your problem: setVehicleColor(kar, tonumber(a) or 0,tonumber(b) or 0,tonumber(c) or 0)
  16. local screenWidth, screenHeight = guiGetScreenSize ( ) ----------------------------------------------------------------------------------- -- function -- for i=1,5 do local imageWidth = screenWidth*(1366/1366) dxDrawImage (screenWidth*(20/1366)+((i-1)*imageWidth) ,screenHeight*(195/768),imageWidth,screenHeight*(768/768), 'x' .. i .. '.png',0,0,0, tocolor(255, 255, 255, 255), false) end You image width and height is too BIG/LARGE/Or what ever. You have to fill that in correctly! But this is how you create images next to each other in a line.
  17. I am not sure what you want. If you want just move a single map to another dimension. Open your .map file in your notepad++ and replace all dimension lines (ctrl+f). Or: You want to move all objects to your dimension? Try this: Client local lastDimension = getElementDimension(localPlayer) local thisResource = getThisResource ( ) addEventHandler("onResourceStart",root, function (res) local objects = thisResource == res and getElementsByType("object") or getElementsByType("object",source) -- source = resourceRoot of that resource. if objects and #objects > 0 then local dimension = getElementDimension(localPlayer) for i=1,#objects do setElementDimension(objects,dimension) end end end) setTimer (function () local dimension = getElementDimension(localPlayer) if dimension ~= lastDimension then lastDimension = dimension local objects = getElementsByType("object") for i=1,#objects do setElementDimension(objects,dimension) end end end,100,1)
  18. -- for lua demo -- local outputChatBox = outputChatBox or print -- url: [url=http://www.lua.org/cgi-bin/demo]www.lua.org/cgi-bin/demo[/url] --------------------- local namePart1 = "Someone ft. someone" local namePart2 = "The someone song" local songName = namePart1 .. " - " .. namePart2 outputChatBox(songName)
  19. Try another name, it is the only possible/visible "thing" that might stop this script from starting.
  20. Or when you are a starter in lua, convert them to textures and delete them. https://wiki.multitheftauto.com/wiki/DxCreateTexture Like this: local image = dxCreateTexture ( "filepath.png" ) fileDelete ("filepath.png") addEventHandler("onClientRender",root, function() dxDrawImage(0,0,1000,1000,image) end)
  21. Is that file name valid? Afaik this should be visible in your console.
  22. They disabled the weapon damage somehow. Use: https://wiki.multitheftauto.com/wiki/OnClientWeaponFire To overwrite the damage.
  23. @Carlos23 +1 Colshapes hardly detect the element type "object".
  24. IIYAMA

    Localchat.

    It is probably sending double messages because you are using the freeroam resource, which is also using this event. Or some other resource.
  25. Just force them out: https://wiki.multitheftauto.com/wiki/Re ... romVehicle
×
×
  • Create New...