Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. And what doesn't work?
  2. Castillo

    Hunter_sky

    -- client side: addEvent("setSkyColor",true) addEventHandler("setSkyColor",root, function () setSkyGradient(0,0,0,0,0,0) setWaterColor(0,206,209, 255) end) -- server side: outputChatBox('#E26161[sCRIPT]: #FFFFFFHunter Sky por #0000FF|eF|#000000*Asus^ #FFFFFFpara #FF9305|RG|Server Racing', getRootElement(), 255, 100, 100, true) function someoneReachedHunter(number, sort, model) if (sort == "vehiclechange" and model == 425) then triggerClientEvent(source,"setSkyColor",source) outputChatBox('#E26161[HUNTER]:Hunter Has Reached Sky Change!', root, 255, 100, 100, true) end end addEvent("onPlayerPickUpRacePickup",true) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),someoneReachedHunter)
  3. Castillo

    F1 Menu

    I don't understand what do you mean. You binded the F1 key to leave the game?
  4. function globalOOC(thePlayer, commandName, ...) local logged = tonumber(getElementData(thePlayer, "loggedin")) if (logged==1) then if not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) else local oocEnabled = exports.global:getOOCState() message = table.concat({...}, " ") local muted = getElementData(thePlayer, "muted") if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) elseif (muted==1) then outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) else local players = exports.pool:getPoolElementsByType("player") local playerName = getPlayerName(thePlayer) local playerID = getElementData(thePlayer, "playerid") local r, g, b = getPlayerNametagColor(thePlayer) local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) local hiddenAdmin = getElementData(thePlayer, "hiddenadmin") local adminLevel = exports.global:getPlayerAdminLevel(thePlayer) exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) for k, arrayPlayer in ipairs(players) do local logged = tonumber(getElementData(arrayPlayer, "loggedin")) local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") if (logged==1) and (targetOOCEnabled==1) then if exports.global:isPlayerAdmin(thePlayer) then if (hiddenAdmin == 0) then if (adminLevel >= 1 and adminLevel < 4) then outputChatBox("(( [GOOC] #00FF00[" .. tostring(adminTitle) .. "]#FFFFCC (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) elseif (admniLevel >= 4) then outputChatBox("(( [GOOC] #FF0000[" .. tostring(adminTitle) .. "]#FFFFCC (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) end else outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) end else outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) end end end end end end end addCommandHandler("o", globalOOC, false, false) addCommandHandler("GlobalOOC", globalOOC)
  5. addEvent( "stopplaySoundRobbery",true ) addEvent( "playSoundRobbery",true ) addEvent( "playSoundRobberyStop",true ) local timerShape,timerWasted bankMarker = createMarker( 364.00500488281,163.38682556152,1008.3828125,"cylinder",3,150,0,0,255 ) bankBip = createBlip ( 2416.5532226563, 1124.1168212891, 10.8203125, 36, 2 ) setElementInterior( bankMarker,3,364.00500488281,163.38682556152,1007.4828125 ) --3 int missionState = 0 bankColshape = createColCircle ( 2414.1735839844,1123.9982910156,10.8203125,1 ) addEventHandler( "onClientColShapeLeave",bankColshape, function( LeaveElement, matchingDimension ) if LeaveElement == localPlayer then if getElementData( LeaveElement,"bank" ) == 1 then outputChatBox( "`Миссия провалена вы не захватили банк!",255,0,0 ) triggerServerEvent( "ServerPlaySoundRobberyStop",root ) setElementData( LeaveElement,"bank",2 ) if isTimer( timerShape ) then killTimer( timerShape ) end timerShape = setTimer( function ( player ) setElementData( player,"bank",0 ) end, 60000, 1,LeaveElement ) end end end ) addEventHandler( "onClientPlayerWasted",localPlayer, function( ) if getElementData( source,"bank" ) == 1 then outputChatBox( "`Миссия провалена вы не захватили банк!",255,0,0 ) triggerServerEvent( "ServerPlaySoundRobberyStop",root ) setElementData( source,"bank",2 ) if isTimer( timerWasted ) then killTimer( timerWasted ) end timerWasted = setTimer( function( player ) setElementData( player,"bank",0 ) end, 60000, 1 , source ) end end ) addEventHandler( "playSoundRobbery",root, function( ) sound = playSound3D ("alarm.mp3", 364.00500488281,163.38682556152,1010.3828125, true ) setSoundMaxDistance ( sound, 50 ) end ) addEventHandler( "playSoundRobberyStop",root, function( ) stopSound( sound ) end ) addEventHandler( "onClientMarkerHit",bankMarker, function( hitElement, matchingDimension ) if hitElement == localPlayer then if getElementData( hitElement,"bank" ) == 1 or getElementData( hitElement,"bank" ) == 2 then return end showCursor( true ) bankWindow = guiCreateWindow(0.3184,0.3568,0.3809,0.306,"ROBBER",true) buttonYes = guiCreateButton(36,147,89,46,"Yes",false,bankWindow) buttonNo = guiCreateButton(251,147,89,46,"No",false,bankWindow) addEventHandler ( "onClientGUIClick", buttonYes, function( ) showCursor( false ) guiSetVisible( bankWindow,false ) triggerServerEvent( "ServerPlaySoundRobbery",root ) --triggerServerEvent("ServerPlaySoundRobbery",localPlayer) outputChatBox( "`Вы захватили банк вы должны продержаться 5 минут.",255,0,0 ) outputChatBox( "`Вы сможете захватить банк через 180 минут.",255,0,0 ) outputChatBox( "`Если вы выйдите из банка то миссия будет провалена!",255,0,0 ) setElementData( hitElement,"bank",1 ) callServerfunction( "setPlayerWantedLevel",hitElement, 6 ) --missionState = 1 if isTimer( bankRobberTimer ) then killTimer( bankRobberTimer ) end bankRobberTimer = setTimer( function( ) outputChatBox("`Вы успешно ограбили банк вы получили 100 000 $.",255,0,0) triggerServerEvent("ServerPlaySoundRobberyStop",root) setTimer( function( ) setElementData( localPlayer,"bank",0 ) end, 60000 , 1 ) callServerfunction( 'givePlayerMoney',localPlayer,100000 ) end, 60000, 1 ) --300000 end ,false ) addEventHandler ( "onClientGUIClick", buttonNo, function ( ) showCursor( false ) guiSetVisible( bankWindow,false ) end ,false ) end end ) function callServerfunction( funcname, ... ) local arg = { ... } if arg[1] then for key, value in next, arg do if type( value ) == "number" then arg[ key ] = tostring( value ) end end end triggerServerEvent( "onClientCallsServerFunction", resourceRoot , funcname, unpack( arg ) ) end addCommandHandler( "data", function( ) setElementData( localPlayer,"bank",0 ) end )
  6. You're welcome.
  7. This is a color generator: http://www.mediafire.com/?gl3gfqlf3838phj But it's on Spanish.
  8. function globalOOC(thePlayer, commandName, ...) local logged = tonumber(getElementData(thePlayer, "loggedin")) if (logged==1) then if not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) else local oocEnabled = exports.global:getOOCState() message = table.concat({...}, " ") local muted = getElementData(thePlayer, "muted") if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) elseif (muted==1) then outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) else local players = exports.pool:getPoolElementsByType("player") local playerName = getPlayerName(thePlayer) local playerID = getElementData(thePlayer, "playerid") local r, g, b = getPlayerNametagColor(thePlayer) local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) local hiddenAdmin = getElementData(thePlayer, "hiddenadmin") exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) for k, arrayPlayer in ipairs(players) do local logged = tonumber(getElementData(arrayPlayer, "loggedin")) local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") if (logged==1) and (targetOOCEnabled==1) then if exports.global:isPlayerAdmin(thePlayer) then if (hiddenAdmin == 0) then outputChatBox("(( [GOOC] #FF0000[" .. tostring(adminTitle) .. "]#FFFFCC (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) else outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) end else outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) end end end end end end end addCommandHandler("o", globalOOC, false, false) addCommandHandler("GlobalOOC", globalOOC) That should not show the admin tag if he's hidden.
  9. I don't understand what do you mean, you want to remove the (Hidden) tag?
  10. You're welcome.
  11. function globalOOC(thePlayer, commandName, ...) local logged = tonumber(getElementData(thePlayer, "loggedin")) if (logged==1) then if not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) else local oocEnabled = exports.global:getOOCState() message = table.concat({...}, " ") local muted = getElementData(thePlayer, "muted") if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) elseif (muted==1) then outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) else local players = exports.pool:getPoolElementsByType("player") local playerName = getPlayerName(thePlayer) local playerID = getElementData(thePlayer, "playerid") local r, g, b = getPlayerNametagColor(thePlayer) local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) for k, arrayPlayer in ipairs(players) do local logged = tonumber(getElementData(arrayPlayer, "loggedin")) local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") if (logged==1) and (targetOOCEnabled==1) then if exports.global:isPlayerAdmin(thePlayer) then outputChatBox("(( [GOOC] #FF0000[" .. tostring(adminTitle) .. "]#FFFFCC (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) else outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) end end end end end end end addCommandHandler("o", globalOOC, false, false) addCommandHandler("GlobalOOC", globalOOC) Do you mean that?
  12. #FFFFCC
  13. function globalOOC(thePlayer, commandName, ...) local logged = tonumber(getElementData(thePlayer, "loggedin")) if (logged==1) then if not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) else local oocEnabled = exports.global:getOOCState() message = table.concat({...}, " ") local muted = getElementData(thePlayer, "muted") if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) elseif (muted==1) then outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) else local players = exports.pool:getPoolElementsByType("player") local playerName = getPlayerName(thePlayer) local playerID = getElementData(thePlayer, "playerid") local r, g, b = getPlayerNametagColor(thePlayer) local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) for k, arrayPlayer in ipairs(players) do local logged = tonumber(getElementData(arrayPlayer, "loggedin")) local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") if (logged==1) and (targetOOCEnabled==1) then outputChatBox("(( [GOOC] #FF0000[" .. tostring(adminTitle) .. "]#FFFFCC (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204, true) end end end end end end addCommandHandler("o", globalOOC, false, false) addCommandHandler("GlobalOOC", globalOOC)
  14. I don't understand your problem. You want to add R, G, B to the chat message? function globalOOC(thePlayer, commandName, ...) local logged = tonumber(getElementData(thePlayer, "loggedin")) if (logged==1) then if not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) else local oocEnabled = exports.global:getOOCState() message = table.concat({...}, " ") local muted = getElementData(thePlayer, "muted") if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) elseif (muted==1) then outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) else local players = exports.pool:getPoolElementsByType("player") local playerName = getPlayerName(thePlayer) local playerID = getElementData(thePlayer, "playerid") local r, g, b = getPlayerNametagColor(thePlayer) local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) for k, arrayPlayer in ipairs(players) do local logged = tonumber(getElementData(arrayPlayer, "loggedin")) local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") if (logged==1) and (targetOOCEnabled==1) then outputChatBox("(( [GOOC] [" .. tostring(adminTitle) .. "] (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, r, g, b) end end end end end end addCommandHandler("o", globalOOC, false, false) addCommandHandler("GlobalOOC", globalOOC)
  15. This event: https://wiki.multitheftauto.com/wiki/OnC ... WeaponFire Has the hit point position.
  16. What is the "count" variable? is it defined somewhere else in your script or just not defined?
  17. It's the explosion, you can't remove it as far as I know.
  18. Un scripter es alguien que sabe de programacion, para eso necesitas aprender Lua y todo lo que necesite el MTA para programar en el mismo. Podes aprender aqui: https://wiki.multitheftauto.com/wiki/ES/ ... %B3n_a_Lua Y aqui: http://www.lua.org/pil/1.html
  19. So, as far as I undestand: Using this game mode will give Mate_ the right to ban players from the server which uses it? Thank god I never use public game modes .
  20. -- client side: spawnScreenMenu = guiCreateWindow ( 0.15, 0.33, 0.7, 0.34, "Welcome to map customer", true ) guiWindowSetMovable ( spawnScreenMenu, true ) guiWindowSetSizable ( spawnScreenMenu, false ) spawnScreenOKButton = guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "OK", true, spawnScreenMenu ) spawnScreenGridList = guiCreateGridList ( 0, 0.1, 1, 0.9, true, spawnScreenMenu ) guiGridListAddColumn ( spawnScreenGridList, "Maps", 0.3 ) guiSetVisible(spawnScreenMenu, false) addEvent("returnServerMaps",true) addEventHandler("returnServerMaps",root, function (mapsTable) guiGridListClear(spawnScreenGridList) for index, map in ipairs(mapsTable) do local row = guiGridListAddRow(spawnScreenGridList) guiGridListSetItemText(spawnScreenGridList,row,1,tostring(map.name),false,false) end end) function triggerGUI() guiSetVisible(spawnScreenMenu, not guiGetVisible(spawnScreenMenu)) showCursor(guiGetVisible(spawnScreenMenu)) if guiGetVisible(spawnScreenMenu) then triggerServerEvent("getServerMaps", localPlayer) end end bindKey("F1", "down", triggerGUI) -- server side: function getServerMaps() local mapsTable = {} for resourceKey, resourceValue in ipairs(getResources()) do local name = getResourceInfo ( resourceValue, "name" ) local type = getResourceInfo ( resourceValue, "type" ) local author = getResourceInfo ( resourceValue, "author" ) local game = getResourceInfo ( resourceValue, "gamemodes" ) if (type == "map" and game == "race") then table.insert(mapsTable, {name=name, author=author or "Unknown"}) end end triggerClientEvent(source,"returnServerMaps",source,mapsTable) end addEvent( "getServerMaps", true ) addEventHandler( "getServerMaps", getRootElement(), getServerMaps )
  21. Castillo

    Hunter_sky

    Esta mal. outputChatBox('#E26161[sCRIPT]: #FFFFFFHunter Sky por #0000FF|eF|#000000*Asus^ #FFFFFFpara #FF9305|RG|Server Racing', getRootElement(), 255, 100, 100, true) function someoneReachedHunter(number, sort, model) if (sort == "vehiclechange" and model == 425) then setSkyGradient(0,0,0,0,0,0) setWaterColor(0,206,209, 255) outputChatBox('#E26161[HUNTER]:Hunter Has Reached Sky Change!', root, 255, 100, 100, true) end end addEvent("onPlayerPickUpRacePickup",true) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),someoneReachedHunter)
  22. El game mode "TDM" viene con el MTA, solo tienes que iniciarlo.
  23. You are using vG scripts, right? if I remember well, they use own account system, so that would mean they don't use the MTA default account's. If that's correct, then it'll never work like this.
  24. You can use a function from another script file of the same resource, as long as both script's are of the same type (client and server side). But if you make the function local, you won't be able to use it.
  25. Castillo

    Help...

    Most of the race/DD has own scripts, they've scripted them or paid someone to do it. The latest resources can be downloaded from: http://code.google.com/p/mtasa-resources/downloads/list But it won't include all these thing's you see in DD servers such as: FFS, XII, and so on.
×
×
  • Create New...