Jump to content

boro

Members
  • Posts

    231
  • Joined

  • Last visited

Everything posted by boro

  1. boro

    Tiger event

    Hi all i have problem i make wasted screen with DrawRectangle but if is player wated then this wated screen see all players why? what is bad ? server side function onPlayerWasted( ammo,attacker,weapon,bodypart ) destroyBlipsAttachedTo(source) setTimer( spawnPlayerTeam, 20000, 1, source ) triggerClientEvent ( "onWasonEvent", root, "text" ) end client side addEvent ( "onWasonEvent", true ) function wasonEventHandler ( text ) addEventHandler("onClientRender", getRootElement(), drawStuffa) -- Keep everything visible with onClientRender. showChat ( false ) showPlayerHudComponent ( "radar", false ) end addEventHandler ( "onWasonEvent", root, wasonEventHandler ) client side function drawStuffa() local x,y = guiGetScreenSize() dxDrawRectangle ( 0, 0, x, y/6, tocolor ( 0, 0, 0, 255 ) ) dxDrawRectangle ( 0, y/1.15, x, y/4, tocolor ( 0, 0, 0, 255 ) ) end
  2. Hi all i make script for set model 165 and 166 when is resource start but when resource start then i have still model number 165 and model 166 no only still 165 model what is bad ? please help addEventHandler("onResourceStart", resourceRoot, function() setElementModel(source, 165 or 166) end )
  3. use this addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "votemap" then outputChatBox ( "INFO: Comand votemap is disabled", source, 255, 69, 0 ) cancelEvent() end end)
  4. boro

    ACL export

    Hi i try make export to acl but this don't work, why ? please help me.. addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), function() aclGroupAddObject (aclGetGroup("Admin"), "resource."..login) end )
  5. boro

    vote setting

    Hi all i make vote system for my gamemode and i set vote but i don't know how to set nomination to 0 for this vote is this setting good for set nomination to 0 ? local poll = { title="Vote for the next map:", visibleTo=getRootElement(), percentage=51, timeout=15, nomination=0, allowchange=true; } here is full script function startNextMapVote() local g_Root = getRootElement() exports.votemanager:stopPoll() local compatibleMaps = exports.mapmanager:getMapsCompatibleWithGamemode(getThisResource()) if #compatibleMaps > 8 then math.randomseed(getTickCount()) repeat table.remove(compatibleMaps, math.random(1, #compatibleMaps)) until #compatibleMaps == 8 elseif #compatibleMaps < 2 then return false end -- mix up the list order for i,map in ipairs(compatibleMaps) do local swapWith = math.random(1, #compatibleMaps) local temp = compatibleMaps[i] compatibleMaps[i] = compatibleMaps[swapWith] compatibleMaps[swapWith] = temp end local poll = { title="Vote for the next map:", visibleTo=getRootElement(), percentage=51, timeout=14, nomination=0, allowchange=true; } for index, map in ipairs(compatibleMaps) do local mapName = getResourceInfo(map, "name") or getResourceName(map) table.insert(poll, {mapName, 'nextMapVoteResult', getRootElement(), map}) end local currentMap = exports.mapmanager:getRunningGamemodeMap() if currentMap and not (mapaSeHrala == 0) then table.insert(poll, {"Play again", 'nextMapVoteResult', getRootElement(), currentMap}) end -- Allow addons to modify the poll g_Poll = poll triggerEvent('onPollStarting', g_Root, poll ) poll = g_Poll g_Poll = nil local pollDidStart = exports.votemanager:startPoll(poll) if pollDidStart then --gotoState('NextMapVote') --addEventHandler("onPollEnd", getRootElement(), chooseRandomMap) end return pollDidStart end addEvent('nextMapVoteResult') addEventHandler('nextMapVoteResult', getRootElement(), function( map ) if not exports.mapmanager:changeGamemodeMap ( map, nil, true ) then return end end )
  6. boro

    tigerEvent help

    yes it work but show me only Grenade Event (grenade image on screen) but if i use molotow then nothing please help
  7. boro

    tigerEvent help

    no this is not bad, client side is good and work i see image to screen but only grenade problem is in server side
  8. boro

    warning problem

    use this mapmanager_main currentGamemode = nil currentGamemodeMap = nil nextGamemode = nil nextGamemodeMap = nil rootElement = getRootElement() addEvent("onGamemodeStart") addEvent("onGamemodeStop") addEvent("onGamemodeMapStart") addEvent("onGamemodeMapStop") addEventHandler("onResourcePreStart", rootElement, function (startingResource) --Is starting resource a gamemode? if isGamemode(startingResource) then --Check if another gamemode is running already if getRunningGamemode() and getRunningGamemode() ~= startingResource then -- Initiate a new changemode sequence and cancel this event outputMapManager( "Initiating changemode from '" .. getResourceName(getRunningGamemode()) .. "' to '" .. getResourceName(startingResource) .. "'" ) changeGamemode(startingResource) cancelEvent(true) end elseif isMap(startingResource) then --Check if another map is running already if getRunningGamemodeMap() and getRunningGamemodeMap() ~= startingResource then -- Initiate a new changemap sequence and cancel this event if isGamemodeCompatibleWithMap ( getRunningGamemode(), startingResource ) then outputMapManager( "Initiating changemap from '" .. getResourceName(getRunningGamemodeMap()) .. "' to '" .. getResourceName(startingResource) .. "'" ) changeGamemodeMap(startingResource) end cancelEvent(true) end end end ) addEventHandler("onPlayerJoin", rootElement, function() if get("currentmap") and getRunningGamemode() and getRunningGamemodeMap() then outputMapManager( "Currently playing: " .. (getResourceInfo(getRunningGamemode(), "name") or getResourceName(getRunningGamemode())) .. " - " .. (getResourceInfo(getRunningGamemodeMap(), "name") or getResourceName(getRunningGamemodeMap())), source ) end end ) addEventHandler("onResourceStart", rootElement, function (startedResource) --Is this resource a gamemode? if isGamemode(startedResource) then --Check no gamemode is running already if getRunningGamemode() then return end if triggerEvent("onGamemodeStart", getResourceRootElement(startedResource), startedResource) then currentGamemode = startedResource --Setup our announcements local gamemodeName = getResourceInfo(currentGamemode, "name") or getResourceName(currentGamemode) if get("ASE") then setGameType(gamemodeName) end if get("messages") then local name = getInstigatorName ( " by " ) or "" outputMapManager("Gamemode '"..gamemodeName.."' started" .. name .. "." ) end --We need to wait a while to see if any maps were started. If not, lets try and start a random one setTimer( function() if not getRunningGamemodeMap() then --Lets check if there are any maps for this gamemode local maps = getMapsCompatibleWithGamemode(getRunningGamemode()) --If we have any, we'll start a random one if #maps > 0 then changeGamemodeMap (maps[math.random(1,#maps)]) end end end, 50, 1 ) else currentGamemode = nil end elseif isMap(startedResource) then --If its a map --Make sure there is a gamemode running if not getRunningGamemode() then return end --Is there a map running already? if getRunningGamemodeMap() then return end --Is it compatible with our gamemode? if isGamemodeCompatibleWithMap ( getRunningGamemode(), startedResource ) then --Lets link the map with the gamemode if ( triggerEvent("onGamemodeMapStart", getResourceRootElement(startedResource), startedResource) ) then currentGamemodeMap = startedResource --Setup our announcements local gamemodeMapName = getResourceInfo(currentGamemodeMap, "name") or getResourceName(currentGamemodeMap) applyMapSettings( currentGamemodeMap ) if get("ASE") then setMapName(gamemodeMapName) end if get("messages") then local name = getInstigatorName ( " by " ) or "" outputMapManager("Map '"..gamemodeMapName.."' started" .. name .. ".") end else currentGamemodeMap = nil end end end end ) addEventHandler("onResourceStop", rootElement, function (stoppedResource) local resourceRoot = getResourceRootElement(stoppedResource) if stoppedResource == currentGamemode then triggerEvent("onGamemodeStop", resourceRoot, currentGamemode) currentGamemode = nil setGameType(false) if currentGamemodeMap then stopResource(currentGamemodeMap) elseif nextGamemode then startGamemodeT(nextGamemode) nextGamemode = nil if nextGamemodeMap then startGamemodeMapT(nextGamemodeMap) nextGamemodeMap = nil end end elseif stoppedResource == currentGamemodeMap then triggerEvent("onGamemodeMapStop", resourceRoot, currentGamemodeMap) currentGamemodeMap = nil resetMapInfo() setMapName("None") if nextGamemode then startGamemodeT(nextGamemode) nextGamemode = nil if nextGamemodeMap then startGamemodeMapT(nextGamemodeMap) nextGamemodeMap = nil end elseif nextGamemodeMap then startGamemodeMapT(nextGamemodeMap) nextGamemodeMap = nil end end end ) function changeGamemodeMap_cmd(source, command, ...) local mapName = #{...}>0 and table.concat({...},' ') or nil source = source or serverConsole local map if mapName then map = getMapFromName(mapName) if not isMap(map) then if (refreshResources and hasObjectPermissionTo(getThisResource(), "function.refreshResources", false)) then outputMapManager("'"..mapName.."' is not a valid map.", source) else outputMapManager("'"..mapName.."' is not a valid map. Use the refresh command and try again", source) end return false end else outputMapManager("Usage: /"..command.." map",source) return false end local gamemode = currentGamemode if not isGamemode(gamemode) then outputMapManager("No gamemode is running.",source) elseif not isMapCompatibleWithGamemode(map, gamemode) then outputMapManager("Map '"..getResourceName(map).. "' is not compatible with '"..getResourceName(gamemode).."'.",source) else setInstigator( source ) changeGamemodeMap(map, gamemode) end end addCommandHandler("changemap", changeGamemodeMap_cmd, true) function changeGamemode_cmd(source, command, gamemodeName,...) local mapName = #{...}>0 and table.concat({...},' ') or nil source = source or serverConsole local gamemode if gamemodeName then gamemode = getResourceFromName(gamemodeName) if not isGamemode(gamemode) then if (refreshResources and hasObjectPermissionTo(getThisResource(), "function.refreshResources", false)) then refreshResources(false) gamemode = getResourceFromName(gamemodeName) if not isGamemode(gamemode) then outputMapManager("'"..gamemodeName.."' is not a valid gamemode.", source) return false end else outputMapManager("'"..gamemodeName.."' is not a valid gamemode. Use the refresh command and try again", source) return false end end else outputMapManager("Usage: /"..command.." gamemode [map]",source) return false end local map if mapName then map = getMapFromName(mapName) if not isMap(map) then if (refreshResources and hasObjectPermissionTo(getThisResource(), "function.refreshResources", false)) then outputMapManager("'"..mapName.."' is not a valid map.", source) else outputMapManager("'"..mapName.."' is not a valid map. Use the refresh command and try again", source) end return false end end setInstigator( source ) changeGamemode(gamemode,map) end addCommandHandler("gamemode", changeGamemode_cmd, true) addCommandHandler("changemode", changeGamemode_cmd, true) function stopGamemode_cmd(source) source = source or serverConsole if currentGamemode then stopGamemode() local gamemodeName = getResourceInfo(currentGamemode, "name") or getResourceName(currentGamemode) outputMapManager("Gamemode '"..gamemodeName.."' stopped.",source) else outputMapManager("No gamemode is running.",source) end end addCommandHandler("stopmode", stopGamemode_cmd, true) function stopGamemodeMap_cmd(source) source = source or serverConsole
  9. boro

    tigerEvent help

    this don't work here is client addEvent ( "onGrenadeEvent", true ) function grenadeEventHandler ( text ) local x,y,w,h = 0.315, 0.780, 0.07, 0.07 local blood = guiCreateStaticImage(x,y,w,h,"images/grenade.png",true) guiSetVisible(blood, true) setTimer (guiSetVisible, 4000, 1, blood, false ) end addEventHandler ( "onGrenadeEvent", root, grenadeEventHandler ) addEvent ( "onMolotowEvent", true ) function molotowEventHandler ( text ) local x,y,w,h = 0.315, 0.780, 0.07, 0.07 local blood = guiCreateStaticImage(x,y,w,h,"images/molotow.png",true) guiSetVisible(blood, true) setTimer (guiSetVisible, 4000, 1, blood, false ) end addEventHandler ( "onMolotowEvent", root, molotowEventHandler )
  10. boro

    tigerEvent help

    Hi all i make tiger for show gun image, it work but only first tigerEvent for show grenade image and when i use molotow then still show me grenade image, what is bad please help ty addEventHandler("onPlayerDamage",getRootElement(), function(attacker,weapon,bodypart,loss) if getWeaponNameFromID(weapon, 16) then triggerClientEvent ( "onGrenadeEvent", root, "text" ) else if getWeaponNameFromID(weapon, 18) then triggerClientEvent ( "onMolotowEvent", root, "text" ) end end )
  11. boro

    Problem

    now not errors but don't work
  12. boro

    Problem

    hm now this [2013-01-01 22:23:55] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function] [2013-01-01 22:23:55] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function] [2013-01-01 22:23:56] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function] [2013-01-01 22:23:62] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function] [2013-01-01 22:23:65] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function] [2013-01-01 22:23:67] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function] [2013-01-01 22:23:69] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function] [2013-01-01 22:23:71] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function] [2013-01-01 22:23:74] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function] [2013-01-01 22:23:76] WARNING: kill\server.lua:19: Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got function]
  13. boro

    Problem

    lol now this error [2013-01-01 22:19:46] SCRIPT ERROR: kill\server.lua:25: unexpected symbol near '==' [2013-01-01 22:19:46] WARNING: Loading script failed: kill\server.lua:25: unexpected symbol near '=='
  14. boro

    Problem

    [2013-01-01 22:08:10] SCRIPT ERROR: kill\server.lua:6: 'then' expected near ')' [2013-01-01 22:08:10] WARNING: Loading script failed: kill\server.lua:6: 'then' expected near ')'
  15. boro

    Problem

    Hi all i make script, when zombie damage player then set health go slow down, but it don't work please help setTimer(function() if ( attacker and attacker ~= source and getElementType ( attacker ) == "ped" ) then setElementHealth(source, getElementHealth(source)-1) end end, 200, 0) addEventHandler("onPlayerDamage", getRootElement(), function() end)
  16. boro

    Help please.

    Check this for start new server https://wiki.multitheftauto.com/wiki/Ser ... the_server
  17. boro

    blip zombie

    try server side addEventHandler ( "onZombieSpawn", root, function ( ) outputChatBox ( "A ZOMBIE HAS JUST SPAWNED!" ) createBlipAttachedTo ( ped, 0 ) end )
  18. boro

    error

    Solidsnake it work thank
  19. boro

    error

    Hmm i edit this but still error addEventHandler("onPlayerSpawn",root, function() local account = getPlayerAccount(source) local zombiekills = getAccountData(account,"Zombie kills") if zombiekills == false then setAccountData ( account, "Rango", "-" ) elseif zombiekills == 5 then setAccountData ( account, "Rango", "Iniciado" ) elseif zombiekills == 100 then setAccountData ( account, "Rango", "Aficionado" ) elseif zombiekills == 250 then setAccountData ( account, "Rango", "Amateur" ) elseif zombiekills == 500 then setAccountData ( account, "Rango", "Asesino" ) elseif zombiekills == 1000 then setAccountData ( account, "Rango", "Maestro" ) elseif zombiekills == 1500 then setAccountData ( account, "Rango", "Cannibal" ) elseif zombiekills == 2000 then setAccountData ( account, "Rango", "Rampager" ) elseif zombiekills == 3000 then setAccountData ( account, "Rango", "Monster" ) elseif Zombiekills == 4000 then setAccountData ( account, "Rango", "Blooder" ) elseif zombiekills == 5000 then setAccountData ( account, "Rango", "ZombieKiller" ) elseif zombiekills == 5000 then setAccountData ( account, "Rango", "HeadShooter" ) elseif zombiekills == 6000 then setAccountData ( account, "Rango", "Animal" ) elseif zombiekills == 7000 then setAccountData ( account, "Rango", "Depredador" ) elseif zombiekills == 8000 then setAccountData ( account, "Rango", "Psicopata" ) elseif zombiekills == 9000 then setAccountData ( account, "Rango", "PsykoKiller" ) end end ) addEventHandler("onPlayerSpawn",root, function () local cuenta = getPlayerAccount(source) if isGuestAccount(cuenta) then return end local rango = getAccountData(cuenta,"Rango") if rango then setElementData(source,"Rango", rango) end end )
  20. boro

    error

    Hi all i have problem in console have this error ERROR: rank/rangos.lua:5: attempt to compare number with boolean What is it ? please help me. addEventHandler("onPlayerSpawn",root, function() local account = getPlayerAccount(source) local zombiekills = getAccountData(account,"Zombie kills") if (zombiekills >= 0) and (zombiekills <= 4) then setAccountData ( account, "Rango", "Nuevo" ) elseif (zombiekills >= 5) and (zombiekills <= 99) then setAccountData ( account, "Rango", "Iniciado" ) elseif (zombiekills >= 100) and (zombiekills <= 249) then setAccountData ( account, "Rango", "Aficionado" ) elseif (zombiekills >= 250) and (zombiekills <= 499) then setAccountData ( account, "Rango", "Amateur" ) elseif (zombiekills >= 500) and (zombiekills <= 999) then setAccountData ( account, "Rango", "Asesino" ) elseif (zombiekills >= 1000) and (zombiekills <= 1499) then setAccountData ( account, "Rango", "Maestro" ) elseif (zombiekills >= 1500) and (zombiekills <= 1999) then setAccountData ( account, "Rango", "Cannibal" ) elseif (zombiekills >= 2000) and (zombiekills <= 2999) then setAccountData ( account, "Rango", "Rampager" ) elseif (zombiekills >= 3000) and (zombiekills <= 3999) then setAccountData ( account, "Rango", "Monster" ) elseif (zombiekills >= 4000) and (zombiekills <= 4999) then setAccountData ( account, "Rango", "Blooder" ) elseif (zombiekills >= 5000) and (zombiekills <= 5999) then setAccountData ( account, "Rango", "ZombieKiller" ) elseif (zombiekills >= 5000) and (zombiekills <= 5999) then setAccountData ( account, "Rango", "HeadShooter" ) elseif (zombiekills >= 6000) and (zombiekills <= 6999) then setAccountData ( account, "Rango", "Animal" ) elseif (zombiekills >= 7000) and (zombiekills <= 7999) then setAccountData ( account, "Rango", "Depredador" ) elseif (zombiekills >= 8000) and (zombiekills <= 8999) then setAccountData ( account, "Rango", "Psicopata" ) elseif (zombiekills >= 9000) and (zombiekills <= 10000000) then setAccountData ( account, "Rango", "PsykoKiller" ) end end ) addEventHandler("onPlayerSpawn",root, function () local cuenta = getPlayerAccount(source) if isGuestAccount(cuenta) then return end local rango = getAccountData(cuenta,"Rango") if rango then setElementData(source,"Rango", rango) end end )
  21. boro

    Rank

    Yes man, big thx now work good
×
×
  • Create New...