Jump to content

darhal

Members
  • Posts

    582
  • Joined

  • Last visited

Everything posted by darhal

  1. oh thank you solidsnake I will ty it as soon as possible
  2. for 2 how to make it like a normal map ?
  3. 1- where I can find all ints ( casino and bank ones ) ? 2- how i can make an interior ? thanks
  4. darhal

    a question

    I need custom blip exemple not this i dont know if you understand me
  5. darhal

    a question

    I understand you idea but can you give me example plz ? and ty
  6. darhal

    a question

    thank you TAPL but it s now it make a line of blips how I can destroy them or hide them ?
  7. darhal

    a question

    for the resource custom blip how can I attatch a blip to a player ??
  8. ty xXmadeXx I fix the problem its work 5/5 now ty you realy help me
  9. does onClientGUIClick work on image static ? if yes why so I try it and expected elment appear at debugscript 1 ?
  10. I advise you to use tables it s will make your work easy
  11. delux or some thing like that you can see it in google write 100 mb free hosting for rockero i know that but my problem is in paypal how to create account and change my realy money to it can you help me ?
  12. I was looking for a host when a friend in my schoo tell me about 100 mn free hosting and he say that its a good free host with FTP acces the question is does i can host my mta server on it or no if yes does it a good one ?
  13. if you mean getting marker in the ground just when you take the x,y,z do -1 to z
  14. لا بس انت متاكد انو راح يشتغل ‏‎ ?‎
  15. So i must check if another script use pigface ? Right ?
  16. هو اللي سوا شطر الكود هو اجنابي ما يبي يساعدني ثاني
  17. السلام عليكم و رحمة اللع اما بعد انا صنعت انا و صديق ليا هذا الكود لوظيفة سائق الاجرة الكود يشتغل كويس بس عندما اخذ الزبون و اوصله الماركر و البلب التالية ما تظهر بلييييييز مساعدة لأني حاولت وحدي و ما قدرت و شكراا client side : function beginTransport(player, seat) local mod = getElementModel(source) if (seat ~= 0 or player ~= localPlayer) then return end if (getElementData(localPlayer, "Occupation") == "Taxi Driver") then if (isElement(deliverMarker) or isElement(startMarker)) then return end if (mod == 420 or mod == 438) then local val = math.random(#locations) local mX, mY, mZ = locations[val][1], locations[val][2], locations[val][3] local area, city = getZoneName(mX, mY, mZ), getZoneName(mX, mY, mZ, true) startMarker = createMarker(mX, mY, mZ - 1, "cylinder", 3, 255, 255, 0, 100) startBlip = createBlipAttachedTo(startMarker, 41) addEventHandler("onClientMarkerHit", startMarker, enteredStartMarker) exports.UIPtexts:output("Drive to "..area..", "..city.." and pick up the client", 255, 255, 0) end end end addEventHandler("onClientVehicleEnter", root, beginTransport) function enteredStartMarker(plr) if (plr ~= localPlayer) then return end if (not isPedInVehicle(plr)) then return end local v = getPedOccupiedVehicle(plr) local m = getElementModel(v) if (m == 420 or m == 438) then destroyElement(source) if (isElement(startBlip)) then destroyElement(startBlip) end local i = math.random(#deliveries) local mX, mY, mZ = deliveries[i][1], deliveries[i][2], deliveries[i][3] local pX, pY, pZ = getElementPosition(localPlayer) local area, city = getZoneName(mX, mY, mZ), getZoneName(mX, mY, mZ, true) exports.UIPtexts:output("The client wants to go to "..area..", "..city.." drive there and deliver the client to get paid", 255, 255, 0) distance = getDistanceBetweenPoints2D(mX, mY, pX, pY) deliverMarker = createMarker(mX, mY, mZ, "cylinder", 3, 255, 255, 0, 150) deliverBlip = createBlipAttachedTo(deliverMarker, 41) addEventHandler("onClientMarkerHit", deliverMarker, enteredDeliverMarker) triggerServerEvent("CUPtaxi.warpPed", root, v) end end function enteredDeliverMarker(plr) if (plr ~= localPlayer) then return end if (not isPedInVehicle(plr)) then return end local v = getPedOccupiedVehicle(plr) local m = getElementModel(v) if (m == 420 or m == 438) then destroyElement(source) if (not distance) then return end if (isElement(deliverBlip)) then destroyElement(deliverBlip) end triggerServerEvent("CUPtaxi.finishJob", root, math.floor(distance)) distance = nil end end function destroy() if (isElement(deliverBlip) and isElement(deliverMarker)) then destroyElement(deliverBlip) destroyElement(deliverMarker) end if (isElement(startMarker) and isElement(startBlip)) then destroyElement(startMarker) destroyElement(startBlip) end end addEvent("onClientResign", true) addEvent("onClientPlayerEndDuty", true) addEventHandler("onClientResign", root, destroy) addEventHandler("onClientPlayerEndDuty", root, destroy) server side local ped = {} local payment = {} function warpPed(veh) if (not isElement(client)) then return end if (not isElement(veh)) then return end local p = createPed(math.random(1, 200), 1, 1, 1) if (not p) then p = createPed(3, 1, 1, 1) end ped[client] = p warpPedIntoVehicle(ped[client], veh, 2 or 3) setVehicleTaxiLightOn(veh, true) end addEvent("CUPtaxi.warpPed", true) addEventHandler("CUPtaxi.warpPed", root, warpPed) function getPay(player) if (payment[player]) then return payment[player][1], payment[player][2] else return 0, 0 end end function finishJob(dist) if (not isElement(client)) then return end local v = getPedOccupiedVehicle(client) if (not isElement(v)) then return end local pay = math.floor(dist) + 150 if (not payment[client]) then payment[client] = {0, 0} end local money = payment[client][1] or 0 local amount = payment[client][2] or 0 payment[client] = {money + pay, amount + 1} --exports.UIPaccounts:GPM(client, pay, "UIPtaxi finished job", true) exports.UIPtexts:output("You have deliveried the client to his location", client, 0, 255, 0) fadeCamera(client, false, 0) setElementFrozen(v, true) if (isElement(ped[client])) then destroyElement(ped[client]) end setTimer(fadeCamera, 1500, 1, client, true) setTimer(setElementFrozen, 1500, 1, v, false) setVehicleTaxiLightOn(v, false) local job = exports.UIPbusiness:getPlayerJob(client) --exports.UIPstats:addPlayerStat(client, job, 1) end addEvent("CUPtaxi.finishJob", true) addEventHandler("CUPtaxi.finishJob", root, finishJob) function givePaymentOnEndJob(jobName) if (jobName == "Taxi Driver") then if (payment[source]) then local m = payment[source][1] or 0 local amount = payment[source][2] or 0 local m = math.floor(m) payment[source] = nil exports.UIPbusiness:addPayment(source, m) exports.UIPaccounts:GPM(source, m, "UIPtaxi ended shift "..amount.." deliveries", true) exports.UIPtexts:output("You have ended your taxi shift and made $"..m.." from "..amount.." deliveries", source, 0, 255, 0) end end end addEvent("onPlayerResign", true) addEventHandler("onPlayerResign", root, givePaymentOnEndJob) addEvent("onPlayerEndDuty", true) addEventHandler("onPlayerEndDuty", root, givePaymentOnEndJob) function givePaymentOnQuitLogout() if (payment[source]) then exports.UIPbusiness:addPayment(source, payment[source][1] or 0) exports.UIPaccounts:GPM(source, payment[source][1] or 0, "UIPtaxi ended shift (quit)") end end addEventHandler("onPlayerLogout", root, givePaymentOnQuitLogout) addEventHandler("onPlayerQuit", root, givePaymentOnQuitLogout) function destroyPed() if (ped[source]) then if (isElement(ped[source])) then destroyElement(ped[source]) end end end addEvent("onPlayerResign", true) addEvent("onPlayerEndDuty", true) addEventHandler("onPlayerQuit", root, destroyPed) addEventHandler("onPlayerLogout", root, destroyPed) addEventHandler("onPlayerWasted", root, destroyPed) addEventHandler("onPlayerResign", root, destroyPed) addEventHandler("onPlayerEndDuty", root, destroyPed) plz help me urgent when I delive the client the next marker + the blip dont shown in map I think the problem here function destroy() if (isElement(deliverBlip) and isElement(deliverMarker)) then destroyElement(deliverBlip) destroyElement(deliverMarker) end if (isElement(startMarker) and isElement(startBlip)) then destroyElement(startMarker) destroyElement(startBlip) end t/debugscript 3 dont say nothing
  18. Hello I m trying to replace skins for my vip system but this dont work here is the code : --clien --Replacing Homer function replaceModel() txd = engineLoadTXD("Homer.txd", 246 ) engineImportTXD(txd, 246) dff = engineLoadDFF("Homer.dff", 246 ) engineReplaceModel(dff, 246) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) -- Alien function replaceModel() txd = engineLoadTXD("Alien.txd", 244 ) engineImportTXD(txd, 244) dff = engineLoadDFF("Alien.dff", 244 ) engineReplaceModel(dff, 244) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) --Big Foot function replaceModel() txd = engineLoadTXD("BigFoot.txd", 256 ) engineImportTXD(txd, 256) dff = engineLoadDFF("BigFoot.dff", 256 ) engineReplaceModel(dff, 256) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) --PigFace function replaceModel() txd = engineLoadTXD("Pigface.txd", 257 ) engineImportTXD(txd, 257) dff = engineLoadDFF("Pigface.dff", 257 ) engineReplaceModel(dff, 257) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) Debugscript 3 say : load error @ engineLoadDFF [unable to load Pigface.dff] Bad argument @engineReplacemodel [expected dff at argument 1 got boolean ] Help plz
  19. In fact a friend have a server called uip and he give me some resources an he say to dont change the script name he help me to make this taxi job but this bug happen and i need help fast to fix it he say that he will not help me more cuz he is busy so castilo can u help me plz i m newbie scripter
  20. Hi all I have this taxi job that I made it work all work but when I deliver the client at his place the next merker and the blip dont shown I dk why I really get nervous about this plz help me !! client side : function beginTransport(player, seat) local mod = getElementModel(source) if (seat ~= 0 or player ~= localPlayer) then return end if (getElementData(localPlayer, "Occupation") == "Taxi Driver") then if (isElement(deliverMarker) or isElement(startMarker)) then return end if (mod == 420 or mod == 438) then local val = math.random(#locations) local mX, mY, mZ = locations[val][1], locations[val][2], locations[val][3] local area, city = getZoneName(mX, mY, mZ), getZoneName(mX, mY, mZ, true) startMarker = createMarker(mX, mY, mZ - 1, "cylinder", 3, 255, 255, 0, 100) startBlip = createBlipAttachedTo(startMarker, 41) addEventHandler("onClientMarkerHit", startMarker, enteredStartMarker) exports.UIPtexts:output("Drive to "..area..", "..city.." and pick up the client", 255, 255, 0) end end end addEventHandler("onClientVehicleEnter", root, beginTransport) function enteredStartMarker(plr) if (plr ~= localPlayer) then return end if (not isPedInVehicle(plr)) then return end local v = getPedOccupiedVehicle(plr) local m = getElementModel(v) if (m == 420 or m == 438) then destroyElement(source) if (isElement(startBlip)) then destroyElement(startBlip) end local i = math.random(#deliveries) local mX, mY, mZ = deliveries[i][1], deliveries[i][2], deliveries[i][3] local pX, pY, pZ = getElementPosition(localPlayer) local area, city = getZoneName(mX, mY, mZ), getZoneName(mX, mY, mZ, true) exports.UIPtexts:output("The client wants to go to "..area..", "..city.." drive there and deliver the client to get paid", 255, 255, 0) distance = getDistanceBetweenPoints2D(mX, mY, pX, pY) deliverMarker = createMarker(mX, mY, mZ, "cylinder", 3, 255, 255, 0, 150) deliverBlip = createBlipAttachedTo(deliverMarker, 41) addEventHandler("onClientMarkerHit", deliverMarker, enteredDeliverMarker) triggerServerEvent("CUPtaxi.warpPed", root, v) end end function enteredDeliverMarker(plr) if (plr ~= localPlayer) then return end if (not isPedInVehicle(plr)) then return end local v = getPedOccupiedVehicle(plr) local m = getElementModel(v) if (m == 420 or m == 438) then destroyElement(source) if (not distance) then return end if (isElement(deliverBlip)) then destroyElement(deliverBlip) end triggerServerEvent("CUPtaxi.finishJob", root, math.floor(distance)) distance = nil end end function destroy() if (isElement(deliverBlip) and isElement(deliverMarker)) then destroyElement(deliverBlip) destroyElement(deliverMarker) end if (isElement(startMarker) and isElement(startBlip)) then destroyElement(startMarker) destroyElement(startBlip) end end addEvent("onClientResign", true) addEvent("onClientPlayerEndDuty", true) addEventHandler("onClientResign", root, destroy) addEventHandler("onClientPlayerEndDuty", root, destroy) server side local ped = {} local payment = {} function warpPed(veh) if (not isElement(client)) then return end if (not isElement(veh)) then return end local p = createPed(math.random(1, 200), 1, 1, 1) if (not p) then p = createPed(3, 1, 1, 1) end ped[client] = p warpPedIntoVehicle(ped[client], veh, 2 or 3) setVehicleTaxiLightOn(veh, true) end addEvent("CUPtaxi.warpPed", true) addEventHandler("CUPtaxi.warpPed", root, warpPed) function getPay(player) if (payment[player]) then return payment[player][1], payment[player][2] else return 0, 0 end end function finishJob(dist) if (not isElement(client)) then return end local v = getPedOccupiedVehicle(client) if (not isElement(v)) then return end local pay = math.floor(dist) + 150 if (not payment[client]) then payment[client] = {0, 0} end local money = payment[client][1] or 0 local amount = payment[client][2] or 0 payment[client] = {money + pay, amount + 1} --exports.UIPaccounts:GPM(client, pay, "UIPtaxi finished job", true) exports.UIPtexts:output("You have deliveried the client to his location", client, 0, 255, 0) fadeCamera(client, false, 0) setElementFrozen(v, true) if (isElement(ped[client])) then destroyElement(ped[client]) end setTimer(fadeCamera, 1500, 1, client, true) setTimer(setElementFrozen, 1500, 1, v, false) setVehicleTaxiLightOn(v, false) local job = exports.UIPbusiness:getPlayerJob(client) --exports.UIPstats:addPlayerStat(client, job, 1) end addEvent("CUPtaxi.finishJob", true) addEventHandler("CUPtaxi.finishJob", root, finishJob) function givePaymentOnEndJob(jobName) if (jobName == "Taxi Driver") then if (payment[source]) then local m = payment[source][1] or 0 local amount = payment[source][2] or 0 local m = math.floor(m) payment[source] = nil exports.UIPbusiness:addPayment(source, m) exports.UIPaccounts:GPM(source, m, "UIPtaxi ended shift "..amount.." deliveries", true) exports.UIPtexts:output("You have ended your taxi shift and made $"..m.." from "..amount.." deliveries", source, 0, 255, 0) end end end addEvent("onPlayerResign", true) addEventHandler("onPlayerResign", root, givePaymentOnEndJob) addEvent("onPlayerEndDuty", true) addEventHandler("onPlayerEndDuty", root, givePaymentOnEndJob) function givePaymentOnQuitLogout() if (payment[source]) then exports.UIPbusiness:addPayment(source, payment[source][1] or 0) exports.UIPaccounts:GPM(source, payment[source][1] or 0, "UIPtaxi ended shift (quit)") end end addEventHandler("onPlayerLogout", root, givePaymentOnQuitLogout) addEventHandler("onPlayerQuit", root, givePaymentOnQuitLogout) function destroyPed() if (ped[source]) then if (isElement(ped[source])) then destroyElement(ped[source]) end end end addEvent("onPlayerResign", true) addEvent("onPlayerEndDuty", true) addEventHandler("onPlayerQuit", root, destroyPed) addEventHandler("onPlayerLogout", root, destroyPed) addEventHandler("onPlayerWasted", root, destroyPed) addEventHandler("onPlayerResign", root, destroyPed) addEventHandler("onPlayerEndDuty", root, destroyPed) plz help me urgent when I delive the client the next marker + the blip dont shown in map I think the problem here function destroy() if (isElement(deliverBlip) and isElement(deliverMarker)) then destroyElement(deliverBlip) destroyElement(deliverMarker) end if (isElement(startMarker) and isElement(startBlip)) then destroyElement(startMarker) destroyElement(startBlip) end t/debugscript 3 dont say nothing
×
×
  • Create New...