Skully

Members
  • Content count

    89
  • Joined

  • Last visited

  • Days Won

    1

Skully last won the day on May 30

Skully had the most liked content!

Community Reputation

17 Decent

2 Followers

About Skully

  • Rank
    Transformer

Recent Profile Visitors

1,675 profile views
  1. [Roleplay] Emerald Gaming [English]

    A new development update for June has been posted which covers our interior system - check it out on our forums! https://forums.emeraldgaming.net/topic/96-development-update-3-june/
  2. HELP WITH GRIDLIST ( PT / EN )

    On the server side where you use setPlayerWantedLevel, just below that add element data and sync it to the client with setElementData. setElementData(player, "wantedlevel", level, true) Replace the variables for player and level for whatever you have. Then in line 4 in the code I provided earlier, replace: if (getPlayerWantedLevel(player) >= 1) then With: if (getElementData(player, "wantedlevel") >= 1) then
  3. function przekaz (nadawca, komenda, odbiorca, kwota) -- who used command, commandname, the variable of the player to whom the money is transferred, amount local pieniazki = tonumber(kwota) --variable amount if (getPlayerMoney(nadawca)==pieniazki) or (getPlayerMoney(nadawca)>pieniazki) then --if the player's amount is equal to or greater than the amount to be sent takePlayerMoney(nadawca, kwota) -- collects the amount of money sent from the player's account outputChatBox("Wysłałeś kwotę" ..pieniazki.. "graczowi" ..odbiorca , nadawca) --sends a successful transaction notification givePlayerMoney(getPlayerFromName(odbiorca), kwota) --here is to be a line with a function whose task is to add a specific amount to the player's account. end end end addCommandHandler("zaplac", przekaz) addCommandHandler("dajkase", przekaz) addCommandHandler("przelej", przekaz) You can use getPlayerFromName to get the player from their name, and then givePlayerMoney.
  4. deathmatch

    This sounds like you're talking about a bug or issue related to a specific server, rather than MTA itself. You should contact the server owner or developer to get assistance with this. If you are talking about MTA itself, you can create a bug report on the mantis.
  5. You'll have to create a .lua file and use the following functions and replace the stock GTA:SA models. TXD Files: EngineLoadTXD and EngineImportTXD DFF Files: EngineLoadDFF and EngineReplaceModel Check the wiki examples on how to use them.
  6. HELP WITH GRIDLIST ( PT / EN )

    function AtualizarListaDeNicks() guiGridListClear(ListaDeProcurados) for index, player in ipairs(getElementsByType("player")) do if (getPlayerWantedLevel(player) >= 1) then -- Get the current player's wanted level, and proceed if it is greater than or equal to 1. FILA = guiGridListAddRow(ListaDeProcurados) guiGridListSetItemText ( ListaDeProcurados, FILA, ColunaPlayers, (string.gsub ( getPlayerName(player), '#%x%x%x%x%x%x', '' ) or getPlayerName(player)), false, false) guiGridListSetItemData ( ListaDeProcurados, FILA, ColunaPlayers, getPlayerName(player)) end end end addEventHandler( "onClientResourceStart", getRootElement(), AtualizarListaDeNicks ) addEventHandler( "onClientPlayerChangeNick", getRootElement(), AtualizarListaDeNicks ) getPlayerWantedLevel is used to get a player's wanted level.
  7. Then you'll have to use database functions such as DbExec to execute queries and update rows in the table where the passwords are located.
  8. [HELP] Clan Adding Script

    function create() FO = createTeam ( "Forever", 255, 0, 0 ) AV = createTeam ( "Avalanche", 255, 255, 255 ) GH = createTeam ( "Ghost", 255, 123, 0 ) end function addplayer(player, cmd, target, clan) local recipient = getPlayerFromName(target) local accName = getAccountName ( getPlayerAccount ( recipient ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( clan ) ) then outputChatBox("* " .. recipientName .. " is already in your clan" , player, 255, 0, 0, true) else if recipient then local r, g, b local recipientName = getPlayerName(recipient) local playerName = getPlayerName(player) outputChatBox("*" .. recipientName .. " #FFFFFF has been added #FF0000" .. clan .. "#FFFFFF clan" , player, 255, 0, 0, true) outputChatBox("*" .. playerName .. " #FFFFFF added you to #FF0000" .. clan .. "#FFFFFF Clan", recipient, 255, 0, 0, true) local team = getTeamFromName(clan) -- Get the actual team from the name provided. if (team) then -- If the team exists. setPlayerTeam ( recipient, team ) r, g, b = getTeamColor (team) setPlayerNametagColor ( recipient, r, g, b ) aclGroupAddObject (aclGetGroup(clan), "user."..accName) else -- If the team the player has provided doesn't exist. outputChatBox("A clan with the name '" .. clan .. "' does not exist!", player, 255, 0, 0) end else outputChatBox("Sorry, we got 0 matches to the name" .. recipientName, player, 255, 0, 0) end end end function kickplayer(player, cmd, target, clan) local recipient = getPlayerFromName(target) local accName = getAccountName ( getPlayerAccount ( recipient ) ) -- get his account name local r,g,b if isObjectInACLGroup ("user."..accName, aclGetGroup ( clan ) ) then setPlayerTeam ( recipient, nil ) setPlayerNametagColor ( recipient, 225, 225, 225 ) aclGroupRemoveObject (aclGetGroup(clan), "user."..accName) else outputChatBox("The Player is Not in" .. clan .. "Clan" .. clan, player, 255, 0, 0) end end addCommandHandler("add", addplayer) addCommandHandler("ckick", kickplayer) addEventHandler("onResourceStart", getRootElement(), create) This should work fine. And to only make the command work for those in the ALC group, you'll have to use isObjectInACLGroup and check if they have the group.
  9. Table

    From my understanding, are you attempting to place a random marker whenever a player does the command? If so, this should work fine. positions = { [1] = {-805.34595, 743.04645, 54.34844}, [2] = {-809.69177, 764.23022, 54.34844}, [3] = {-838.24719, 731.62659, 54.34844}, [4] = {-834.38562, 762.48022, 54.34844}, } addCommandHandler("commander", function() local ran = math.random(1, #positions) local marker = createMarker(positions[ran][1], positions[ran][2], positions[ran][3], "ring", 3, 255, 0, 0, 255) createBlipAttachedTo(marker, 18) end)
  10. Hi!

    What are the errors you're getting?
  11. Name of ped task\

    I'm not sure if there's an official list out there that lists all the tasks, but you could simply try it yourself and use GetPedTask to check what it is.
  12. Help! It's simple.

    You can simplify it down even further. addEventHandler("onClientPlayerSpawn", localPlayer, function() setElementHealth(source, 1) end)
  13. Hi!

    You can achieve this by using the event handler OnMarkerHit, this is triggered whenever a element enters your marker. To make a player/ped do an animation, we can use SetPedAnimation and trigger it on our player that enters the marker. The animation will play for however long you like as specified in the fourth parameter. Here's your finished code. function createRob() Marker = createMarker(1788.9731445313, -1123.0570068359, 23.5, "cylinder", 1, 255, 0, 0, 5) setElementCollisionsEnabled(Marker, false) bl = createBlipAttachedTo(Marker, 45) end addEventHandler("onResourceStart", resourceRoot, createRob) addEventHandler("onMarkerHit", Marker, function(player) -- Attach the event handler to the marker so it detects when a player enters it. if (player) and (getElementType(player) == "player") then -- If the element who entered the marker was a player. setPedAnimation(player, "ROB_BANK", "CAT_SAFE_OPEN", 4000, false, false, false, false) -- Play an animation in the ROB_BANK category for 4000ms. end end) addEventHandler("onMarkerLeave", Marker, function(player) if (source ~= Marker) then return end if (isPedInVehicle(player)) then return end destroyElement(Marker) destroyElement(bl) randomMoney = math.random(22000, 22000) randomWanted = math.random (5, 5) givePlayerMoney(player, randomMoney) setPlayerWantedLevel(player, randomWanted) robPlayer = getPlayerName(player) setTimer(createRob, 600000, 1) end)
  14. Bad Argument @ getElementParent

    Try this. function detectHit() if getElementType(markerBlip)=="vehicle" then outputChatBox("Get out of that vehicle",markerBlip,255,0,0) else outputChatBox("Get out of that vehicle",markerBlip,255,0,0) end end function devMarker() local deliveryMarker = createMarker(-2300.9340820313, -1649.5125732422, 483.56658935547, "checkpoint") local markerBlip = createBlipAttachedTo(deliveryMarker, 23) end addEventHandler("onMarkerHit", markerBlip, devMarker) function setupSpawns(thePlayer, command) local x, y, z = getElementPosition(thePlayer) local helicopter = createVehicle(417, 0, 0, 0) local spawned = spawnVehicle (helicopter, x+3, y+3, z) if spawned then exports.SANGcommands:sendMessage("A helicopter has been abandonded (R Icon). Deliver it for a good payday!", 255, 255, 255) local heliBlip = createBlipAttachedTo(helicopter, 34) setElementParent(heliBlip, helicopter) end end addCommandHandler("startheli", setupSpawns) addCommandHandler("startheli", devMarker)
  15. Table

    It looks like your markers are being fine, using the coordinates you've specified in the table, are you sure those coordinates are correct to what you want? Also, I wouldn't recommend calling a variable table since it'll override the default Lua table functions.