
Apo
Members-
Posts
141 -
Joined
-
Last visited
Everything posted by Apo
-
function marker(player) local x, y, z = getElementPosition(player) marker = createMarker( x, y, z, "cylinder", 2, 255, 0, 0, 150, getRootElement(thePlayer )) blip= createBlip( x, y, z, 0, 2, 255, 0, 255, 255) end addCommandHandler("marker", marker) i need 2 help 1. I can just see marker 2. if i am near or goto marker , marker deleted
-
no my script fixed i am only need delete marker and only player see marker
-
hi guys please help me if player goto marker , marker is clean and marker only show for player function findvehs(thePlayer, commandName, id) if not (id) then outputChatBox("SYNTAX: /" .. commandName .. " [id]", thePlayer, 255, 194, 14) else local theVehicle = getElement("vehicle", tonumber(id)) if theVehicle then local rx, ry, rz = getVehicleRotation (theVehicle) local x, y, z = getElementPosition(theVehicle) marker = createMarker( x, y, z, "corona", 4, 255, 0, 255, 150, getRootElement(thePlayer )) createBlip( x, y, z, 0, 2, 255, 0, 255, 255) end end end end addCommandHandler("findveh", findvehs, false, false)
-
cannot make dead coroutine [string "?"] please help me what's the problem?
-
hi please help me for make camera shoting for example: when i shoting by sniper my camera Move with the arrow his and when arrow end of the range and kille player come back me camera come back me
-
hi please help me for fix error WARNING: test\test.lua:2: Bad argument @ 'getElementModel' [Expected element at argument 1, got nil] local vehplayer = getPedOccupiedVehicle(thePlayer) if not (getElementModel(vehplayer) == 582) then outputChatBox("you are not in news car",thePlayer,255,0,0) else ..... ...... .....
-
hi When I entered my server , in the my sql i have wanted 3 but no show my wanted Wanted\wantedlevels.lua:10: attempt to concatenate local 'wanted' (a nil value) if not (targetPlayer) then outputChatBox("SYNTAX: /" .. commandName .. " [Player Partial Nick / ID] ", thePlayer, 255, 194, 14) else local targetPlayer, targetPlayerName =findPlayerByPartialNick(thePlayer, targetPlayer) if targetPlayer then local logged = getElementData(targetPlayer, "login") if (logged==1) then local wanted = tonumber(getElementData(targetPlayer,"wanted")) outputChatBox ("player have ae "..wanted..".",thePlayer) end end end end addCommandHandler("getwanted",getwanted)
-
hi guys please help me for script if plear jaked vehicle set caommand for player call 911 and set wanted targetplayer call 911 ony for 60 secound can use else player no can not call 911
-
hi guys please help me for make faction for accept ticket plaer for example: i need add command for target player if the player ticket the target player , if targetplayer acceptticket theplayer pay money for theplayer function mandat(player, cmd, who, ile) local who = getPlayerFromName(who) if getPlayerTeam(player) == getTeamFromName("Police") then takePlayerMoney(who, tonumber(ile)) outputChatBox("Player "..getPlayerName(who).." has been given ticket ("..tonumber(ile).."$)") end end addCommandHandler("ticket", mandat) in need command for acceptticket for targetplayer
-
hi guys please help me for make command for targetplayer for accept pay money if target player no accept ticket player no pay money script 100% work only i need accept command for targetplayer for pay money function ticket(thePlayer, commandName, targetPlayerNick, price, ...) local logged = getElementData(thePlayer, "login") local targetPlayer, targetPlayerName =findPlayerByPartialNick(thePlayer, targetPlayerNick) local hoursplayed = getElementData(targetPlayer, "hoursplay") if targetPlayer then if (logged==1) then local theTeam = getPlayerTeam(thePlayer) local factionType = getElementData(theTeam, "type") if (factionType==2) then if not (targetPlayerNick) or not (price) or not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Player Partial Nick] [Amount] [Reason]", thePlayer, 255, 194, 14) elseif hoursplayed<= 2 then outputChatBox("This person is less then hoursplayed!", thePlayer, 255, 0, 0) else price= tonumber(price) if (price>= 61) then outputChatBox("This is too much to ask for.", thePlayer, 255, 0, 0) else local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if (distance >= 10) then outputChatBox("You are too far away '".. targetPlayerName .."'.", thePlayer, 255, 0, 0) else local reason = table.concat({...}, " ") local money = getMoney(targetPlayer) local bankmoney = getElementData(targetPlayer, "bankmoney") if money + bankmoney >= 1 then if money + bankmoney < amount then outputChatBox("The player cannot afford the ticket(not money).", thePlayer, 255, 0, 0) else local takeFromCash = math.min( money, amount ) local takeFromBank = amount - takeFromCash takeMoney(targetPlayer, takeFromCash) -- Distribute money between the PD and Government local tax = exports.global:getTaxAmount() giveMoney( theTeam, math.ceil((1-tax)*price) ) giveMoney( getTeamFromName("Government of Los Santos"), math.ceil(tax*amount) ) outputChatBox("You ticketed " .. targetPlayerName .. " for " .. formatMoney(amount) .. ". Reason: " .. reason .. ".", thePlayer) outputChatBox("You were ticketed for " .. formatMoney(amount) .. " by " .. getPlayerName(thePlayer) .. ". Reason: " .. reason .. ".", targetPlayer) if takeFromBank > 0 then outputChatBox("Since you don't have enough money with you, $" .. formatMoney(takeFromBank) .. " have been taken from your bank account.", targetPlayer) end end end end end end end end end end addCommandHandler("ticket", ticket, false, false)
-
I saw a few servers that police car sirens and lights for infernus or bullet Created
-
hi guys please help me for add object police light for other vehicle
-
not work please test and help me checkGateMarker1 = createMarker (1544.6999511719, -1630.8000488281, 13.199999809265, "corona", 10.0, 0, 0, 255, 0 ) function createGate1 (thePlayer) gatePolice1 = createObject ( 968, 1544.6999511719, -1630.8000488281, 13.199999809265, 0, 90, 89.999938964844 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate1 ) function openbase_area69gates(thePlayer) moveObject (gatePolice1, 1000, 1544.69921875, -1630.7998046875, 13.199999809265, 0, -90, 0 ) end function onLeave1 ( thePlayer ) setTimer ( closebase_area69gates, 3000, 1, thePlayer ) end addEventHandler ( "onMarkerLeave", checkGateMarker1, onLeave1 ) function closebase_area69gates(thePlayer) moveObject (gatePolice1, 1000, 1544.6999511719, -1630.8000488281, 13.199999809265, 0, 90, 0 ) end addEventHandler ("onResourceStart",getRootElement(), horn) function horn (thePlayer, commandName) bindKey ( thePlayer, "H", "down", closebase_area69gates ) end addEventHandler ("onResourceStart",getRootElement(), horn)
-
hi guys please help me for fix script in need help for make Hoot by car for open and close gate only open and close by Beeping checkGateMarker = createMarker (1588.53125, -1637.988, 7.630457115173, "corona", 10.0, 0, 0, 255, 0 ) function createGate (thePlayer) gatePolice = createObject ( 3055, 1588.53125, -1637.988, 13.630457115173 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) function gateCheckingTeam ( thePlayer,seat ) local seat = getPedOccupiedVehicleSeat(thePlayer) if seat == 0 then moveObject ( gatePolice, 976, 1588.53125, -1637.988, 7.630457115173 ) end end addEventHandler ( "onMarkerHit", checkGateMarker, gateCheckingTeam ) function onLeave ( thePlayer ) setTimer ( movingBackPolice, 3000, 1, thePlayer ) end addEventHandler ( "onMarkerLeave", checkGateMarker, onLeave ) function movingBackPolice () moveObject ( gatePolice, 3000, 1588.53125, -1637.988, 13.630457115173 ) end
-
hi guys plese help me for call faction for example: faction 1(thePlayer) if team == 1 then setPlayerNametagColor(thePlayer, 255, 255, 255) elseif team 2 then setPlayerNametagColor(thePlayer, 255, 255, 255) end end faction 2() how to cal faction 1 int faction 2 for set name tag color if faction 2 == add player team faction 1 call for change namecolor end