Jump to content

Walid

Members
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Walid

  1. is there anyway that if i do the /invisible command again ill go back to the alpha 255? and btw Whoami it worked ty. use getElementAlpha () Example function invisible() if getElementModel(localPlayer) == 179 then if getElementAlpha (localPlayer) == 255 then setElementAlpha(localPlayer, 0) else setElementAlpha(localPlayer, 255) end end end addCommandHandler ( "invisible", invisible )
  2. the source of this event is the weapon that was fired.
  3. use onClientPlayerDamage()
  4. Try to use addEventHandler("onPlayerSpawn", root, function() if getElementData(source, "team") == "Heavy" then setPedArmor(source, 100) else setPedArmor(source, 0) end end) or you need to add something like this in s_main.lua setElementData(client,"Class",class.name )
  5. Man try to show us your edited script
  6. ??? lol there is no element data called "Class" in this script : https://community.multitheftauto.com/?p=resources&s=details&id=1152
  7. Are you sure post you meta here.
  8. Try this function dontTryBug ( hitPlayer, matchingDimension ) if matchingDimension and isElement(hitPlayer) and getElementType ( hitPlayer ) == "player" and hitPlayer == localPlayer then -- Your code end end
  9. You must add type = "client" in your meta file
  10. you need to use : getTimerDetails ()
  11. it can be like this : for i=1,#table do if table[i][1] == serial then --etc ... end
  12. Try to change your table like this : table = { [1] = {"playerSerial1","somedata","someotherdata"}, [2] = {"playerSerial2","somedata2","someotherdata2"}, [3] = {"playerSerial3","somedata3","someotherdata3"} }
  13. try this: for i,v in pairs(table) do local type = getElementsByType("player") for index, player in pairs(type) do local serial = getPlayerSerial (player) if v[1] == serial then return v[2] or v[3] -- data here etc..... else return false end end
  14. so i think you need to check your files.
  15. Try this : "GTA_SA_Podmianki" author= "Matevsz" type="gamemode" version= "1.0.0" />
  16. Post the meta file here
  17. yeh i forgot to change it
  18. Walid

    Not Work

    lol the source of this event is the player that just spawned.
  19. change (playersource;theplayer) to spurceplayer. Code: function bless (spurceplayer) if isElement (spurceplayer) then local account = getPlayerAccount(spurceplayer) if ( not account or isGuestAccount ( account ) ) then return end if isObjectInACLGroup("user." .. getAccountName(account), aclGetGroup("Admin")) then for id, player in ipairs(getElementsByType("player")) do setElementData(player,"blood", 12000) setElementData(player,"bleeding", 0) setElementData(player,"cold", false) setElementData(player,"temperature", 37) setElementData(player,"pain", false) setElementData(player,"brokenbone", false) setElementData(player,"thirst", 100) setElementData(player,"food", 100) end outputChatBox("#6495ED[DVOORN]#C0C0C0All players were cured.!", spurceplayer, 255, 255, 255, true) end end end addCommandHandler("aheall", bless)
  20. Walid

    Not Work

    try this : function onPlayerSpawnHandler () local account = getPlayerAccount ( source ) if ( not account or isGuestAccount ( account ) ) then return end if ( isObjectInACLGroup ( "user." .. getAccountName (account) , aclGetGroup ( "VIP" ) ) ) then setPedArmor ( source, 100 ) end end addEventHandler( "onPlayerSpawn", root, onPlayerSpawnHandler )
  21. In this way? addEvent('addClothes', true) function addClothes(player, clothesTexture, clothesModel) local cType = cClothes[clothesModel] local clothe = cType[clothesTexture] if (player == localPlayer) then if (Shader) then dxSetShaderValue(Shader, 'gTexture', clothe.model) engineApplyShaderToWorldTexture(Shader, clothesModel, player) end end end addEventHandler('addClothes', root, addClothes) yes
×
×
  • Create New...