-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Because you're saving the team element userdata, not the team name.
-
--safecol = createColCuboid ( 3386.82764, -754.43237, 27.01133, 255, 255, 255 ) -- sintax: posX, posY, posZ, sizeX, sizeY,sizeZ (este genera un cuadro invisible q no deja que los zombien ni lo que no sean de los grupos acl enten) safeZoneRadar = createRadarArea ( 3386.82764, -754.43237, 280, 320, 66, 199, 255 ) -- sintax: posX, posY, sizeX, sizeY, colorR, colorG, colorB, colorAlfa (este forma un cuadro en el radar y en el mapa) setElementData ( safeZoneRadar, "zombieProof", true ) safecol = createColSphere ( -2307.53149, 2224.94287, -0.55000, 255, 255, 255 ) function enterZone ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then local accountname = getAccountName ( getPlayerAccount ( hitElement ) ) if isObjectInACLGroup ( "user.".. accountname, aclGetGroup ( "USS" ) ) then toggleControl ( hitElement, "fire", true ) toggleControl ( hitElement, "aim_weapon", true ) toggleControl ( hitElement, "vehicle_fire", true ) -- tiene lo derechos de acl al ENTRAR outputChatBox ( "Bienevnido a La Base [u.S.S].", hitElement, 0, 100, 255 ) else -- no tiene los derechos de acl al ENTRAR outputChatBox ( "Zona Restringida , Solo Personal Autorizado.", hitElement, 255, 0, 0 ) killPed ( hitElement ) end elseif ( getElementType ( hitElement ) == "ped" ) then killPed ( hitElement ) end end addEventHandler ( "onColShapeHit", safecol, enterZone ) function leaveZone ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) then local accountname = getAccountName ( getPlayerAccount ( leaveElement ) ) toggleControl ( leaveElement, "fire", true ) toggleControl ( leaveElement, "aim_weapon", true ) toggleControl ( leaveElement, "vehicle_fire", true ) -- tiene los derechos de acl al SALIR outputChatBox("Haz salido de la base.", leaveElement, 255, 0, 0) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "USS" ) ) then -- no tiene los derechos de acl al SALIR killPed ( leaveElement ) outputChatBox("Acceso denegado.", leaveElement, 255, 0, 0) end elseif ( getElementType ( leaveElement ) == "ped" ) then killPed ( leaveElement ) end end addEventHandler ( "onColShapeLeave", safecol, leaveZone ) Your problem is that you have 2 colshapes, I've tested with the second one and it killed me.
-
Well, that should work, if the element that hit the colshape is a "player" it'll do the check, if it's a "ped", it'll kill him.
-
safecol = createColCuboid ( 3386.82764, -754.43237, 27.01133, 255, 255, 255 ) -- sintax: posX, posY, posZ, sizeX, sizeY,sizeZ (este genera un cuadro invisible q no deja que los zombien ni lo que no sean de los grupos acl enten) safeZoneRadar = createRadarArea ( 3386.82764, -754.43237, 280, 320, 66, 199, 255 ) -- sintax: posX, posY, sizeX, sizeY, colorR, colorG, colorB, colorAlfa (este forma un cuadro en el radar y en el mapa) setElementData (safeZoneRadar, "zombieProof", true) safecol = createColSphere( -2307.53149, 2224.94287, -0.55000, 255, 255, 255 ) function enterZone ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then local accountname = getAccountName ( getPlayerAccount ( hitElement ) ) if isObjectInACLGroup ( "user.".. accountname, aclGetGroup ( "USS" ) ) then toggleControl ( hitElement, "fire", true ) toggleControl ( hitElement, "aim_weapon", true ) toggleControl ( hitElement, "vehicle_fire", true ) -- tiene lo derechos de acl al ENTRAR outputChatBox ( "Bienevnido a La Base [u.S.S].", hitElement, 0, 100, 255 ) else -- no tiene los derechos de acl al ENTRAR outputChatBox ( "Zona Restringida , Solo Personal Autorizado.", hitElement, 255, 0, 0 ) killPed ( hitElement ) end elseif ( getElementType ( hitElement ) == "ped" ) then killPed ( hitElement ) end end addEventHandler ( "onColShapeHit", safecol, enterZone ) function leaveZone ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) then local accountname = getAccountName ( getPlayerAccount ( leaveElement ) ) toggleControl ( leaveElement, "fire", true ) toggleControl ( leaveElement, "aim_weapon", true ) toggleControl ( leaveElement, "vehicle_fire", true ) -- tiene los derechos de acl al SALIR outputChatBox("Haz salido de la base.", leaveElement, 255, 0, 0) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "USS" ) ) then -- no tiene los derechos de acl al SALIR killPed ( leaveElement ) outputChatBox("Acceso denegado.", leaveElement, 255, 0, 0) end elseif ( getElementType ( leaveElement ) == "ped" ) then killPed ( leaveElement ) end end addEventHandler ( "onColShapeLeave", safecol, leaveZone ) Is that what you mean?
-
Topic moved to: "Maps > Support". @On topic: You can play cars around the map with Map Editor, just go to the MTA Main menu and click on "Map Editor", place your cars, save the map, and load it on your server.
-
With that attitude you won't go far. I was trying to help you.
-
Well, then you'll have to start learning how to script on Lua. https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
A GUI progress bar? if so, you can trigger a client side event to show it, then start a timer to increase percent, and check if the percent is 100%, then trigger to server side to set the color.
-
That's what I meant, as 1 second timer is not much of a delay.
-
You would need to use the colshape and radar area functions to make this.
-
@qaisjp: Let them do what they want, is their time and life.
-
Well done, are you expecting to release this?
-
1: This topic should go at: "Resources" section. 2: You should search on the MTA community before ask. 3: Check this out: https://community.multitheftauto.com/ind ... ls&id=1152
-
I don't see anything wrong at your code.
-
It has to work, what is 'source' in your script?
-
No te enojes, pero ese codigo no tiene mucho sentido.
-
http://www.gtagaming.com/downloads/gta- ... -mods/2364 These are very detailed.
-
https://community.multitheftauto.com/ind ... ils&id=532 https://community.multitheftauto.com/ind ... ils&id=531
-
dxDrawImage guiCreateStaticImage
-
addEventHandler ( "onResourceStart", resourceRoot, function ( ) for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then bindKey ( thePlayer, "F2", "down", bindear ) else outputChatBox("no eres admin",source) end end end ) function bindear ( thePlayer ) triggerClientEvent ( thePlayer, "open:pGUI", thePlayer ) end addEvent("get:Fields",true) addEventHandler("get:Fields",root,function( clear1,clear2,clear3,clear4,clear5,clear6 ) if clear1 and clear2 and clear3 and clear4 and clear5 and clear6 then local pedXML = xmlLoadFile(":pedGUI/peds/peds.xml") local pChild = xmlCreateChild(pedXML, "ID") local IDPed = xmlNodeSetAttribute(pChild, "Name", clear6) local skin = xmlNodeSetAttribute(pChild, "skin", clear4) local posX = xmlNodeSetAttribute(pChild, "posX", clear1) local posY = xmlNodeSetAttribute(pChild, "posY", clear2) local posZ = xmlNodeSetAttribute(pChild, "posZ", clear3) local rotation = xmlNodeSetAttribute(pChild, "rotation", clear5) local state = xmlNodeSetAttribute(pChild, "state", inactive) if pChild and IDPed and skin and posX and posY and posZ and rotation then triggerEvent ( "send:Fields", source ) outputChatBox("datos transferidos correctamente", source) xmlSaveFile(pedXML) end end end ) function sendFields() local pedXML = xmlLoadFile(":pedGUI/peds/peds.xml") local pChild = xmlFindChild(pedXML,"ID",0) local nameID = xmlNodeGetAttribute(pChild,"Name") local state = xmlNodeGetAttribute(pChild, "state") triggerClientEvent("get:Values", source, nameID, state) end addEvent("send:Fields",true) addEventHandler("send:Fields",root,sendFields)
-
Maybe if you create them with a delay?
-
What do you mean by "outside of the map"?