-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
There's nothing special, you have to make the transfer functions, it'll be hard if you have a lot of accounts in your XML file.
-
Try this: function clickmenu ( mouseButton, buttonState, clickedElement, worldPosX, worldPosY, worldPosZ, screenPosX, screenPosY ) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Police" ) ) then if ( buttonState == "down" ) then if ( getElementData ( getRootElement(), "adminclickopen" ) == false ) then if ( getElementData (getRootElement(), "adminclickmousebind") == true ) then if ( mouseButton == "right" ) then if ( clickedElement ) then if ( getElementType (clickedElement) == "player" ) then name = getPlayerName (clickedElement) setElementData (getRootElement(), "adminclickselplayer", tostring(name) ) setElementData (getRootElement(), "adminclickopen", true) triggerClientEvent (source,"playermenu", getRootElement() ) elseif ( getElementType (clickedElement) == "vehicle" ) then thecar = clickedElement setElementData ( source, "adminclickselplayer", thecar ) triggerClientEvent (source,"carmenu", getRootElement() ) --setElementVelocity ( clickedElement, 0, 0, 1.5) end end elseif ( mouseButton == "left" ) then --outputChatBox ( worldPosX .. "," .. worldPosY .. "," .. worldPosZ ) --[[ Random send cars & players flying, can be abused col = createColCircle ( worldPosX, worldPosY, 15) colelements = getElementsWithinColShape (col) for theKey,theElement in ipairs(colelements) do if ( getElementType (theElement) == "player" ) then setElementVelocity ( theElement, 2, 0, 5) elseif ( getElementType (theElement) == "vehicle" ) then setElementVelocity ( theElement, 2, 0, 1.5) end end --]] end end end end end end
-
El scoreboard no soporta imagenes, tenes que editar el recurso.
-
No, no existe, pero podes crearla vos mismo, el admin panel tiene los nombres para cada ID, crea una tabla y luego obtenes el nombre de con el ID.
-
@Booo: Do you know what a for-loop is? for-loops are used with tables, you can't use it with a number/string. http://www.lua.org/pil/4.3.4.html
-
You have to make a function to translate the XML content to a MySQL table, you must have knowledge of both database systems.
-
Google's translation API is no longer free, so you can't really use this anymore.
-
@alejandro: Ese recurso solo es un objeto para que uses en tus mapas, no es ninguna zona. Para crear zonas en el mapa y que se vean en F11 ( el mapa grande ) tenes que usar: createRadarArea Hace click en el enlace.
-
Si, eso quiere el. @Pekio: Proba este recurso: https://community.multitheftauto.com/index.php?p= ... ls&id=3580
-
De nada. P.D: No me habia fijado que eras de MDP .
-
addCommandHandler -- Para agregar el comando. isObjectInACLGroup -- Para verificar si el jugador esta en el grupo: Owner/Moderator setElementPosition -- Para cambiar de posicion aun element, en este caso el jugador.
-
-- server side: addEventHandler ( "onPlayerWeaponSwitch", root, function ( previous, current ) if ( previous == 4 or current == 4 ) then takeWeapon ( source, 4 ) end end ) Ese script eliminara el Knife cuando cambies de arma.
-
You're checking if the player is on "Police" ACL group, are you sure you don't want to check if player is on "Police" team?
-
Try this: function onLogin ( _, account ) local sTeamName = getAccountData ( account, 'POLICE' ) if ( account and not isGuestAccount ( account ) and sTeamName ) then setPlayerTeam ( source, getTeamFromName ( sTeamName ) ) setElementModel ( source, 280 ) spawnPlayer ( source, 2292.0925292969, 2451.7045898438, 10.8203125, 0, 280, 0, 0 ) else setPlayerTeam ( source, nil ) end end addEventHandler ( "onPlayerLogin", root, onLogin ) function saveData ( account ) local account = type ( account ) == "userdata" and account or getPlayerAccount ( source ) local team = getPlayerTeam ( source ) local teamName = team and getTeamName ( team ) or "" if ( account and not isGuestAccount ( account ) and teamName == "Police" ) then setAccountData ( account, "POLICE", teamName ) end end addEventHandler ( "onPlayerQuit", root, saveData ) addEventHandler ( "onPlayerLogout", root, saveData )
-
@Cassandra: You should have read the whole topic, he firstly did that, but he wanted to do it indexed, e.g: id, name, age, etc, etc, with that it'll be like: name, id, profession.
-
I'm not sure if this map was uploaded with permission of Rafinha. https://community.multitheftauto.com/index.php?p= ... ls&id=4226
-
Tendrias que crear un ACL para cada "grupo" y luego restringir los poderes del mismo.
-
La verdad es que no te recomiendo usar el ACL para un sistema de clanes o algo parecido, yo cree un recurso que te permite crear clanes, agregar miembros, agregar sub liders y ademas es publico, te dejo el link. https://community.multitheftauto.com/index.php?p= ... ls&id=1514
-
Proba copiar el ultimo script de nuevo.
-
Click the link I posted, there's a example of how it works.
-
You can do it via scripting, use the function: removeWorldModel.