Jump to content

IIYAMA

Moderators
  • Posts

    6,063
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. oh didn't not read that part, is everything fixed now?
  2. no no no, now you post another script.
  3. addEvent("pizzaReachDestination",true) addEventHandler("pizzaReachDestination",getRootElement(), function (thePlayer) local theVehicle = getPedOccupiedVehicle(thePlayer) if not theVehicle or getElementModel(theVehicle) ~= 448 then return end -- must be a number, not a string "448" > 448 -- outputChatBox("You have delivered the pizza, and received $25", thePlayer, 0, 255, 0) exports.global:giveMoney(thePlayer, 25) if getElementData(thePlayer,"pizzaStop") == #pizzaRoute[getElementData(thePlayer,"pizzaRoute")] then setElementData(thePlayer,"pizzaStop",1) else setElementData(thePlayer,"pizzaStop",tonumber(getElementData(thePlayer,"pizzaStop"))+1) end GGgetNewDDestination(thePlayer, getElementData(thePlayer,"pizzaStop")) end)
  4. local animationStop = function (player) if isElement(player) then setPedAnimation(player,false) outputChatBox("animation stopped",player) end end addCommandHandler("anim", function (player) setPedAnimation ( player, "ped", "WOMAN_walknorm", 1000, true, true, false,true ) setTimer(animationStop,1000,1,player) end)
  5. yes do what? another animation?
  6. IIYAMA

    help

    yep function killPlayerIfTheyPressThisKey ( thePlayer, key ) if ( getControlState ( thePlayer, key ) ) then outputChatBox ( "You can do that..", thePlayer ) setElementVelocity ( thePlayer, 3, 3, 1 ) else --- end end
  7. Is it a stolen/leaked script?
  8. IIYAMA

    An Question

    Sometimes there is data that is created at client side, I didn't mention that you use some of it client. Just in case.
  9. math.random(-40,40) random from the center,
  10. You should watch out with those timers, they can destroy your whole server performance. I don't know what the problem is, every seems fine except for the amount of timers for some elements. Try this and make check if the markers got created: local elementTable = {} for i=1, 8 do local newX, newY = getPointFromDistanceRotation(x, y, 15, 360 * (i/8)); local marker_round = createMarker(x,y,z,"corona",3,math.random(255),math.random(255),math.random(255),255) local dumy_round = createObject(1235,x,y,z) attachElements(marker_round,dumy_round) moveObject(dumy_round,4000,newX,newY,z-20,0,0,0,"OutQuad") elementTable[#elementTable+1]=marker_round elementTable[#elementTable+1]=dumy_round if marker_round then outputChatBox("marker successfully created, marker number: " .. i) end end setTimer(function() for i=1,#elementTable do local element = elementTable[i] if isElement(element) then destroyElement(element) end end end,4000,1)
  11. function afkKill() local car = getPedOccupiedVehicle(source) if car then blowVehicle (car) end end addEvent( "afkSlap", true ) addEventHandler( "afkSlap", getRootElement(), afkKill) Make sure he has a car before you try to blow it. You can't blow a boolean(false).
  12. IIYAMA

    An Question

    People that crash most of the time end up with Timed out. Client data can't reach the server, so things on clientside can't saved on the server any more. But serverside data should not be a problem, as long the receive functions start directly after he quits. It must be something with the system, as far I know the event always got triggered. But if I am wrong, pls let me know.
  13. IIYAMA

    problem sql

    no proof needed, he is a known stealer. Wasted my time a several times,
  14. IIYAMA

    onPedWasted

    use onPlayerWasted as well.
  15. nope, this is for direct updating the vehicle colours, when you are busy with your colour picker. Learn lua and then come back asking for help for things like this. I showed you how to do this, but you wanted to stick with your own way. Good luck,
  16. Your idea isn't going to work, but you have to find it out by your self. I fixed those errors/warnings, as far as I know. But I send them as pm, I don't post not(good) working code.
  17. it depends if you are going to change all vehicles or only the ones that got controlled by the player. I would punt the player as key and the vehicle + colours as data. vehicleTable = {} addCommandHandler ( "check", function( thePlayer ) local car = getPedOccupiedVehicle ( thePlayer ) if car then local d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12 = getVehicleColor ( car, true ) vehicleTable[thePlayer] = {car = car, oldColours ={d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12} } end end) addCommandHandler ( "check2", function( thePlayer ) local vehiclePlayertable = vehicleTable[thePlayer] if vehiclePlayertable then local car = vehiclePlayertable.car if isElement(car) then local oldColours = vehiclePlayertable.oldColours if oldColours then setVehicleColor ( car,unpack(oldColours)) end else vehicleTable[thePlayer]= nil -- remove it from the table end end end) addEventHandler("onPlayerQuit",root, function () if vehicleTable[source] then vehicleTable[source] = nil end end)
  18. local thing for local data, data that can go in the trash after using it.
  19. local A = 10 if A then local A = 50 outputChatBox(A) -- 50 end outputChatBox(A) -- 10
  20. https://forum.multitheftauto.com/viewtopic.php?f=148&t=40809
  21. your code is based on global values from all the players, If you want to script at serverside you have to use tables or elementdata(not recommended). Not just throw global data all over the place.
  22. Golanu21, if you don't define the type it will set automatic to serverside. @ Booker DeWitt: - The script starts correct? - Correct folder name? - /debugscript 3 Normally the server console will show you if the resource starts with success.
×
×
  • Create New...