Jump to content

WASSIm.

Members
  • Posts

    1,412
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by WASSIm.

  1. hi guys i need help, i make script compile scripts on resources but how i an check if script compiled ? addEventHandler("onResourcePreStart", root, function (resource) if (resource == getThisResource()) then return end local resourceName = getResourceName(resource) if (compileres[resource]) then --setResourceInfo(resource, "laststart", date) for i, script in ipairs (getResourceScripts(resource)) do local theScript = fileOpen(":"..resourceName.."/"..script.."", true) if (theScript) then -- HERE end end end end) function getResourceScripts(resource) local scripts = {} local resourceName = getResourceName(resource) local theMeta = xmlLoadFile(":"..resourceName.."/meta.xml") for i, node in ipairs (xmlNodeGetChildren(theMeta)) do if (xmlNodeGetName(node) == "script") then local script = xmlNodeGetAttribute(node, "src") if (script) then table.insert(scripts, script) end end end xmlUnloadFile(theMeta) return scripts end
  2. function onPlayerTargeted ( _, theVehicle ) local object = getElementModel ( source ) if object == 18450 and getElementType(theVehicle) == "vehicle" then blowVehicle ( theVehicle ) end end addEventHandler ( "onClientObjectDamage", root, onPlayerTargeted )
  3. try this function CheckingOnLogin() setTimer ( function(source) if isPlayerInSafeZone(source) then outputChatBox(getPlayerName(source).." logged in and in safe zone",root,255,0,0) setElementData(source,"isPlayerInSafeZone",true) toggleControl (source, "fire", false) toggleControl (source, "aim_weapon", false) else outputChatBox(getPlayerName(source).." logged in and not in safe zone",root,255,0,0) end end, 5000, 1, source ) end addEventHandler("onPlayerLogin",root,CheckingOnLogin)
  4. WASSIm.

    Alliance

    WTF you scriped spawn system and you can't script this ? i think you'r use leaked resource
  5. --FIXING WEAPON PROPERTIES local rangeProperty = { {"M4", 31, "pro", "weapon_range", 200}, {"M4", 31, "std", "weapon_range", 150}, {"M4", 31, "poor", "weapon_range", 90}, {"SNIPER", 34, "pro", "weapon_range", 500}, {"SNIPER", 34, "std", "weapon_range", 300}, {"SNIPER", 34, "poor", "weapon_range", 200}, {"AK47", 30, "pro", "weapon_range", 200}, {"AK47", 30, "std", "weapon_range", 150}, {"AK47", 30, "poor", "weapon_range", 90}, } function setWeaponAutomaticRangeFixOn() for i,data in ipairs( rangeProperty ) do local id, skill, property, value = unpack(data) setWeaponProperty(id, skill, property, value) end end addEventHandler("onResourceStart", getRootElement(), setWeaponAutomaticRangeFixOn)
  6. WRONG BOARD: viewforum.php?f=91
  7. i changed my skin by admin panel + script working but this event only don't work EDIT finaly its work its not working if change skin with admin panel
  8. yeah addEventHandler("onElementModelChange", root, function ( ) outputChatBox("Check player skin...", source, 255, 255, 0) if (getElementType(source) == "player") then triggerClientEvent(source, "onCheckPlayerSkin", source) outputChatBox("Check player skin...", source, 255, 255, 0) end end)
  9. hi guys, event onElementModelChange not working ? there nothing on debug and i do manuel debug but nothing
  10. you can use this function function loadScript(file) local file = fileOpen(file) if (file) then local content = fileRead(file, fileGetSize(script)) local loaded = loadstring(content) fileClose(file) if (loaded) then return true end end return false end
  11. WASSIm.

    One code.

    just tell us what is problem ?
  12. WASSIm.

    Updating server

    Windows or Linux ?
  13. i ask in channel but no one answer
  14. executeSQLQuery("CREATE TABLE IF NOT EXISTS users (usermoney INT, username TEXT)") function DinDinBanco(playerSource, command) local dindin = 5000 local account = getPlayerAccount(playerSource) if (account) and not (isGuestAccount(account)) then local accountName = getAccountName(account) local money = getPlayerMoney(playerSource) local data = executeSQLQuery("SELECT * FROM users WHERE username=?", accountName) if not (data) then executeSQLQuery("INSERT INTO users (usermoney, username) VALUES(?, ?)", money, accountName) end if (executeSQLQuery("UPDATE users SET usermoney = ? WHERE username=?" , money+dindin, accountName)) then givePlayerMoney ( playerSource, dindin ) outputChatBox("You Got 5000") else outputChatBox("Erro Porra") end else outputChatBox("You need to be log-In") end end addCommandHandler("din", DinDinBanco)
  15. WASSIm.

    suggestions

    hi guys i working for server zombie i hope anyone give me good suggestions
×
×
  • Create New...