-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
No hay de que.
-
You don't get me, I won't give it away, I'm not even using it because is not mine.
-
I do have both, citizen and traffic, but I won't upload it as I haven't scripted it, and also, I agree with Benxamix and Crystal.
-
function showPanel(thePlayer) local account = getPlayerAccount(thePlayer) -- Habias puesto theplayer, con la P en minusculas. if isObjectInACLGroup( 'user.'..getAccountName( account ), aclGetGroup( 'Admin' ) ) then triggerClientEvent(thePlayer, "openWindow1", getRootElement()) else outputChatBox ("¡Acesso Denegado!", thePlayer, 255, 0, 0) end end addCommandHandler("usspanel", showPanel)
-
You're welcome.
-
function tables() outputChatBox("Top 3 points:", getRootElement(), 255,255,255) for index, data in ipairs(sortAccounts()) do outputChatBox("#"..tostring(index)..": ".. tostring(data.account) .." - ".. tostring(data.points), getRootElement(), 255, 255, 255) if index == 3 then break end end end addCommandHandler("top", tables) function sortAccounts() local rowdata = {} for index, account in pairs(getAccounts()) do rowdata[index] = { account = getAccountName(account), points = getAccountData(account,"Points"), } end local comparator = function (a, b) return (tonumber(a.points) or 0) > (tonumber(b.points) or 0) end table.sort(rowdata, comparator) return rowdata end Seems to be working.
-
If you want to keep updating the money I would suggest using DX drawing functions, because they are updated each render. function E () local money = getPlayerMoney(localPlayer) Cashlbl = guiCreateLabel(12,54,203,20,"Cash : ~{ " .. tostring(money).. " }~",false) guiLabelSetColor(Cashlbl,255,255,255) guiLabelSetVerticalAlign(Cashlbl,"top") guiLabelSetHorizontalAlign(Cashlbl,"left",true) setTimer(updateMoneyLabel,500,0) end addEventHandler("onClientResourceStart", resourceRoot, E) function updateMoneyLabel() local money = getPlayerMoney(localPlayer) guiSetText(Cashlbl, "Cash : ~{ " .. tostring(money).. " }~") end That should update it each 0.5 seconds.
-
function E () local money = getPlayerMoney(localPlayer) Cashlbl = guiCreateLabel(12,54,203,20,"Cash : ~{ " .. tostring(money).. " }~",false) guiLabelSetColor(Cashlbl,255,255,255) guiLabelSetVerticalAlign(Cashlbl,"top") guiLabelSetHorizontalAlign(Cashlbl,"left",true) end addEventHandler("onClientResourceStart", resourceRoot, E)
-
What bad about many servers haveing the mod... It would be great for real life modes. The script you are asking for does indeed exist, it was originally made by lil_Toady, however it has never been released. The script did require a LOT from the server, and crashed the server quickly because mta wasnt able of handling so many peds at the same time. This doesn't happen in the latest MTA versions, right? my server never crashed even with vehicles and peds resource running at same time.
-
El error ese significa que el lado del servidor intento usar un evento del cliente que no existia, intenta reiniciar el recurso "scoreboard".
-
Yo crearia una tabla para los pickups. local pickups = {} -- por aca un onResourceStat q pone la variable getElementData "cuantosMarkers" en 1 function cuandoPisaElMarker (player) local contador = tonumber(getElementData(root, "cuantosMarker")) if getElementData (source, "TipoDeMarker") == "MarkerEvent" then if contador >= 5 then if isElement (otroMarker) then destroyElement (otroMarker) end otroMarker = createMarker (X, Y, Z, "cylinder", 255, 255, 255) setElementInterior (otroMarker, 3) setElementData (otroMarker, "TipoDeMarker", "MarkerEvent") setElementData (root, "cuantosMarkers", contador+1) end if contador == 5 then destroyElement (otroMarker) local newIndex = #pickups +1 pickups[newIndex] = createPickup (358.4599609375, 160.2431640625, 1008.3, 3, 1550, 1) setElementInterior (pickups[newIndex], 3) addEventHandler ("onPickupHit", pickups[newIndex], CuandoCojeElDinero) -- pone el evento end end end addEventHandler("onMarkerHit", resourceRoot, cuandoPisaElMarker) function cuandoCojeElDinero (player) givePlayerMoney (player, 30000) -- ganancia outputChatBox ("Bien, llegaste ahora ganas 30k!", player, 255, 255, 0) -- output cancelEvent() --para q no se destruya la pickup end Igual, hay algo que no entiendo, para cada jugador un pickup? si es asi, porque no lo destruyes al usarlo?
-
Try changing the encoding to UTF-8.
-
No hay de que. Cierro el tema para que no hagan spam.
-
function updateWantedLevel() for index, player in pairs(getElementsByType("player")) do local level = getPlayerWantedLevel( player ) local nameTag = getPlayerName( player ) setPlayerNametagText ( player, nameTag.. "[".. tostring(level) .. "]" ) end end setTimer(updateWantedLevel,1500,0)
-
I think you could use shaders to change the radar textures, you could ask Gamesnert, If I'm right, he done it before.
-
No hay de que, yo habia usado ese evento antes, por eso me acorde . Cierro el tema para que no hagan spam.
-
Lo que queres desactivar son las stealth kills con el chuchillo? si es asi, intenta con esto: addEventHandler("onClientPlayerStealthKill", localPlayer, function () if (getPedWeapon(source) == 4) then cancelEvent() end end)
-
Use guiSetInputEnabled.
-
Aren't you forgetting something Benxamix? addEventHandler ( "onClientPreRender", setFPSCamera ) You forgot about "root".
-
lol, it's the same as TAPL's, I guess the rotation was messing it. P.S: You're welcome.
-
Try setting z position +1.
-
function res ( ) local x, y, z = getElementPosition ( source ) outputChatBox ( "Respawn after 5 seconds...", source, 255, 255, 0, true ) setTimer ( spawnPlayer, 5000, 1, source, x, y, z, 0, math.random ( 0,200 ), getElementModel(source) ) end addEventHandler ( "onPlayerWasted", getRootElement( ), res )
-
I'm pretty sure spawnPlayer set's the player health to 100%, so you should put setElementHealth AFTER spawnPlayer.
-
You must edit the water shader script to make it enable/disable with a function.
