Jump to content

Anubhav

Members
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by Anubhav

  1. Search before posting. viewtopic.php?f=108&t=79794
  2. Anubhav

    About color

    No problem. EDIT: 900th post
  3. Anubhav

    About color

    local r,g,b = math.random(0,255),math.random(0,255),math.random(0,255) createRadarArea(X, Y, Z, S, r, g, b, 170)
  4. Thanks XeoN.. Soon I'll create more maps. Next map will be a basketball coat.
  5. playerDamage = {} addEventHandler("onClientPlayerDamage", root, function() playerDamage[localPlayer] = getTickCount() end ) setTimer( function () if not playerDamage[localPlayer] or playerDamage[localPlayer] > 5000 then setElementHealth ( localPlayer, ( getElementHealth ( localPlayer ) + 15 ) ) end end,5000,0) end
  6. U must be working whole day but me no work on it all day.
  7. Did you even see the difference dafuq.. I din't copied the code.
  8. Add command.commandname in ACL.
  9. Remember dude, client-side only execute when player downloads resource. So you can't use onClientResourceStart before onPlayerJoin. onClientResourceStart is triggered when a resource starts not when players resource get started.
  10. markers = {} vehicles = {} blips = {} function lsjobser () if isElement(vehicles[source]) then destroyElement(vehicles[source]) end if isElement(blips[source]) then destroyElement(blips[source]) end if isElement(markers[source]) then destroyElement(markers[source]) end vehicles[source] = createVehicle (498, 1604.68, -1475.15, 13.93) warpPedIntoVehicle ( source, vehicles[source] ) markers[source] = createMarker (979.65, -1261.75, 15.22, "cylinder", 2, 255, 0, 0, 255) blips[source] = createBlipAttachedTo (markers[source], 51) end addEvent ("givePlayerJobLS", true) addEventHandler ("givePlayerJobLS", root, lsjobser) function moneyLS (attacker) if isTimer(cooldown) then return end if (attacker) and (attacker ~= source) then cooldown = setTimer(function() end, 1000, 1) givePlayerMoney(attacker, 3000) setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+2) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end if isElement(blips[source]) then destroyElement(blips[source]) end if isElement(markers[source]) then destroyElement(markers[source]) end end end addEventHandler( "onMarkerHit", resourceRoot, moneyLS ) function lvjobser () if isElement(vehicles[source]) then destroyElement(vehicles[source]) end if isElement(blips[source]) then destroyElement(blips[source]) end if isElement(markers[source]) then destroyElement(markers[source]) end vehicles[source] = createVehicle (498, 1604.68, -1475.15, 13.93) warpPedIntoVehicle(attacker, vehicles[source]) markers[source] = createMarker (1074.43, 1292.71, 9.82, "cylinder", 2, 255, 0, 0, 255) blips[source] = createBlipAttachedTo (markers[source], 51) end addEvent ("givePlayerJobLV", true) addEventHandler ("givePlayerJobLV", root, lvjobser) function sfjobser () if isElement(vehicles[source]) then destroyElement(vehicles[source]) end if isElement(blips[source]) then destroyElement(blips[source]) end if isElement(markers[source]) then destroyElement(markers[source]) end vehicles[source] = createVehicle (498, 1604.68, -1475.15, 13.93) warpPedIntoVehicle(source, vehicles[source]) markers[source] = createMarker (-2052.80, 144.87, 27.83, "cylinder", 2, 255, 0, 0, 255) blips[source] = createBlipAttachedTo (markers[source], 51) end addEvent ("givePlayerJobSF", true) addEventHandler ("givePlayerJobSF", root, sfjobser)
  11. Ty for reminding @ DNL function desapar() for k,player in ipairs(getElementsByType("player")) do if getPlayerTeam(player) == getTeamFromName("Policia Militar Oficial") then outputChatBox ( "#00B3FFSalario recebido foi de #00FF2A$#F6FF009000 (teste)", player, 10, 118, 240, true) end end end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),desapar)
  12. function desapar(player) if getPlayerTeam(player) == getTeamFromName("Policia Militar Oficial") then outputChatBox ( "#00B3FFSalario recebido foi de #00FF2A$#F6FF009000 (teste)", player, 10, 118, 240, true) end end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),desapar)
  13. -- Check if a user already exsit in database function checkIfUserExist() outputDebugString("Check if in checkIfUserExist Function - OK") local query = dbQuery(connect, "SELECT account FROM Player WHERE account = ?", account) local result = dbPoll(query, -1) local compare = result[1] if compare then outputDebugString(compare) local compAccount = compare.account outputDebugString(compAccount) if compAccount == account then return 1 -- User already exist in DB else return 0 -- User doesn't exist in DB end else return 0 end end
  14. Any error in /debugscript 3?
  15. Anubhav

    Is it a bug?

    Whenever I connect to 1.4 to any other version it gives me a redirection with a ok sign with nothing written on it. When I try again it writes you've to connect to 1.3 and blabbla. Is it a bug? It only occurs in 1.4 I think
  16. addEventHandler("onResourceStart", resourceRoot, function() setTimer(function() for k,source in ipairs(getElementsByType("player")) do if getTeamName(getPlayerTeam(source)) == getTeamFromName("Policia Militar Oficial") then givePlayerMoney ( source, 1 ) outputChatBox ( "#00B3FFSalario recebido foi de #00FF2A$#F6FF001 (teste)", source, 10, 118, 240, true) end end end, 1000, 0) end )
  17. Made a function for you function getDeadPlayersInTeam(theTeam) local theTable = { } local players = getPlayersInTeam(theTeam) for i,v in pairs(players) do if isPedDead(v) then theTable[#theTable+1]=v end end return theTable end -- I modified a function from MTA;SA wiki. use this also; spawnPlayer()
  18. https://wiki.multitheftauto.com/wiki/Ge ... yersInTeam ( use full function ) and use spawnPlayer
  19. What if we don't have a old unsed computer? How are you going to do it?
×
×
  • Create New...