Karoffe
Members-
Posts
89 -
Joined
-
Last visited
Everything posted by Karoffe
-
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
-
And how to calculate the offset ?
-
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 ?
-
Thanks, Working. but i've got some questions, What is the utility of the colored characters in there ?
-
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
-
Yes, i know that.. I mean what if the table looks like that ? for index in ipairs(table) do
-
Yea, Worked, what about the other question ?
-
an example please ? "add the player names to a string" How's that ? local name = name ..getPlayerName(player) ???
-
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 ?
-
So you mean it cannot be solved ? right ?
-
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.
-
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.
-
Because i don't wanna reset his animation ? as i know -1 means infinite
-
setTimer(setPedAnimation, 500, 1, ped,"BEACH", "bather", -1, false, false, false, true)
-
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
-
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 )
-
Edit: Solved.., Thanks Et-Win and madex
-
Thanks again. but what if i want to remove the event handler ?
-
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 ?
-
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
-
Aha, fixed, just needed to reconnect
