Jump to content

Karoffe

Members
  • Posts

    89
  • Joined

  • Last visited

Everything posted by Karoffe

  1. Karoffe

    solved

    EDIT: The topic was a question about how can i delay a line from being executed in a function.
  2. Karoffe

    Videos.

    No, actually i was talking about an offline video downloaded in the client's pc with the resource which gets played.
  3. Karoffe

    Videos.

    Is it possible to play video files(mp4, wmv, avi) in mta ? I've heard it is possible with shaders if that's true then how ?
  4. Problem is these would work if the images are not in rotation, so that way will work when the bounding boxes touches eachother, I want it to be with the image itself, Anyways i personally thought of doing your way easier by getDistanceBetweenPoints2D.. but still won't work with rotated images
  5. And how to calculate the offset ?
  6. Hello. i will make a bunch of images move, I want to know whenever an images touches an other, the image gets destroyed, I know almost everything, just how to know if the image touched an other one ?
  7. Karoffe

    string.gsub

    Thanks, Working. but i've got some questions, What is the utility of the colored characters in there ?
  8. Karoffe

    string.gsub

    Just a quick question, what if i got a string like this "Word(12)", How to transform it to be : "12", so i actually want to remove "Word()". EDIT: In a better way i want someone to explain me how the patterns work
  9. Karoffe

    2 Questions

    Yes, i know that.. I mean what if the table looks like that ? for index in ipairs(table) do
  10. Karoffe

    2 Questions

    Yea, Worked, what about the other question ?
  11. Karoffe

    2 Questions

    an example please ? "add the player names to a string" How's that ? local name = name ..getPlayerName(player) ???
  12. Karoffe

    2 Questions

    First question is: for k, player in ipairs(getElementsByType("player")) do outputChatBox(getPlayerName(player)) in that example it will loop through every player.. how could i make it just loop 1 time and outputs it like that for example "playername1 playername2 playername3" Second question is: I remember i saw a loop like that for index in ipairs(table) do what is that used for ?
  13. So you mean it cannot be solved ? right ?
  14. I want that when i set the ped's animation it doesn't resets automatically. Without looping ^^ Edit: If you didn't understand the problem, the problem is when i set the animation of a ped, everything is alright for me, but if i went away to SF and came back to him lets say in LS i see him just standing without any animation.
  15. You have just made the same thing as looping animation does,, but you loop every 500ms. That didn't solve the problem as i don't want it to loop.
  16. Because i don't wanna reset his animation ? as i know -1 means infinite
  17. setTimer(setPedAnimation, 500, 1, ped,"BEACH", "bather", -1, false, false, false, true)
  18. Whenever i create a ped and set an animation to him which the animation will not loop.. so what happens is when i leave the ped for example in los santos and go to SF and then go back to LS the ped loses his animation. the only solution i found is to enable the loop in the function which i don't want, any ideas ? Edit: Before asking,, Yes the script is serverside
  19. Well, how could you can get an account data of a player element ? you should pass the account instead addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() , function () for i, p in ipairs ( getElementsByType ( "player" ) ) do local account = getPlayerAccount (p) if not ( isGuestAccount( account ) ) then --if ( getAccountData ( p , "vip" ) ) then if ( getAccountData ( account , "vip" ) ) setElementData ( p, "vip", true ) setElementData ( p, "vip.time", tonumber ( getAccountData ( p, "vip.time" ) ) ) startVip ( p ) end end end end )
  20. Edit: Solved.., Thanks Et-Win and madex
  21. Thanks again. but what if i want to remove the event handler ?
  22. Thanks.
  23. function justatest(text) outputChatBox(text) end addEventHandler( "onClientResourceStart", getRootElement( ), justatest("Yes it is a test!!")) I want to call a function with it arguments in a event handler or a command.. actually it works, it outputs "Yes it is a test!!" but with an error "bad argument @addEventHandler [expected function at argument 3, got none]" is it possible to call the function with the argument without the error to happen ?
  24. local timer1 function () outputChatBox ("bla bla", source, 255, 0, 0, false) if isTimer(timer1) then killTimer (timer1) end end function (player) timer1 = setTimer ( function() outputChatBox ("miau miau", source, 255, 0, 0, false) end, 5000, 1 ) end
  25. Aha, fixed, just needed to reconnect
×
×
  • Create New...