Jump to content

ViRuZGamiing

Members
  • Posts

    1,050
  • Joined

  • Last visited

Everything posted by ViRuZGamiing

  1. use hitElement not source, source is the colshape that's hit
  2. Wouldn't get camera matrix' 4th, 5th and 6th returned float help? I suppose that Position is always where you're looking at of you'd need to Ignore the height of where it's looking else you'd teleport on top of things. At least that's what I think
  3. Not familiar with textures but maybe wrap helps? dxSetTextureEdge
  4. This person isn't capable of filling in arguments so we have another case of ''hey I need this script''
  5. because destroyElement(mark2) can't find mark2, write local mark2 in top of the script
  6. function mark1Func() if isElement(mark1) then destroyElement(mark1) end mark2 = createMarker(1167.412109375, -1741.021484375, 11.5, "cylinder", 8, 255, 69, 0, 150) addEventHandler("onMarkerHit", mark2, mark2Func) end place your event handler in the scope of your variable
  7. remove " on line 30 also I don't see those elements of destroyElement defined
  8. Just remove the text; "Your vehicle will change in: "..counter
  9. well if you have these example events that supposable would be triggered on the described moment: local vehicleIDS = { 602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585, 405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460, 417, 469, 487, 513, 581, 510, 509, 522, 481, 461, 462, 448, 521, 468, 463, 586, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 485, 552, 431, 438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 523, 470, 598, 499, 588, 609, 403, 498, 514, 524, 423, 532, 414, 578, 443, 486, 515, 406, 531, 573, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 449, 537, 538, 570, 441, 464, 501, 465, 564, 568, 557, 424, 471, 504, 495, 457, 539, 483, 508, 571, 500, 444, 556, 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458, 606, 607, 610, 590, 569, 611, 584, 608, 435, 450, 591, 594 } local carTimer //this might be a real event, haven't checked I don't do race stuff usually addEventHandler("onPlayerRaceSpawn", getRootElement(), function() if (isTimer(carTimer)) then killTimer(carTimer) end carTimer = setTimer(function() --also suppose that source is the driver setVehicleModel(getPedOccupiedVehicle(source), vehicleIDS[math.random(0, #vehicleIDS)]) end, 15000, 0) end) addEventHandler("onPlayerRaceWasted", getRootElement(), function() if (isTimer(carTimer)) then killTimer(carTimer) end end)
  10. Kill the timer when you die, create it when you spawn.
  11. define means to give it a name. for example; your code needs to use getPlayerName(thePlayer) 10 times. Instead of writing this 10 times (especially with longer lines it's better) you can give it a 'name'. name = getPlayerName(thePlayer) name is now defined as the result of getPlayerName (which returns a name as a string or false value) Another little example: outputChatBox(number) --number doesn't exist as a name, it's unDEFINED number = 7 outputChatBox(number) --outputs: 7 Hope this helps
  12. I think you're not good at chinese right now, since that is Japanese easy to hear the difference because of the writing and pronunciation also I'm learning Korean myself
  13. Well this is quite logically. You're looking for your if-statement to be true. But it'll never be. Example you're number is 5. Then you are indeed below 6. But you aren't above or at 20. There is no existing number that's bigger than 20 but ALSO smaller than six. I do understand that you were thinking in hours instead of numbers. Change the and with an or if tonumber(h) >= 20 or tonumber(h) < 6 then
  14. I'd say give them ID's would make sense when working with SQL as well
  15. is this server or client sided well I had a good chuckle with this one
  16. No one here will 'please give' you a script for free. You can either ask a scripter and pay them for there work OR learn to script and ask help here.
  17. make this return t < 0 and t + 360 or t it's shorter and ; isn't necessary (doesn't cause no harm tho)
  18. So if I understand correctly you can do this setTimer(mtaFunction, timeInterval, timesToExecute, [arguments for mtaFunction]) Ah yes I see so the behaviour is actually the same, it doesn't matter if it's a predefined function or selfmade. it just requires any function. Thanks I didn't knew this actually quite logical!
  19. getPlayerName(source) returns false, which means source isn't a player That being because the event is onResourceStart Quoting wiki's onResourceStart: Source The source of this event is the root element in the resource that started. source = the resource started (this isn't the player)
  20. woops my bad, thx for correcting yes you do want that, but you should work in smaller pieces instead of the big chunk. if you aren't able to. Make this. if it works add the rest.
  21. You're still working server sided
  22. @IIYAMA Thanks voor de verjaardagsfelicitatie, prettig kerst en feestdagen btw. T'is mss een overkill maar alles is ook zo gelijkaardig en ik doe mainly C# nu. Ziet hier nu gewoon dagelijks het Scripting forum wat te bekijken
  23. I'd start without the SQL part, make a GUI Window with a gridlist with all the names of cars you'd like and set data to each gridlist row, if you select it you'd setElementModel (if you're always having a car shown) or do destroyObject and createVehicle
×
×
  • Create New...