-
-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add killPedTask function #3808
base: master
Are you sure you want to change the base?
add killPedTask function #3808
Conversation
What would happen if you kill ped task while being in the air (complex jump tasks)? |
u will fall stand still the animation will stop but you have to call it in each frame like onClientRender function displayMyTask ()
killPedTask(localPlayer, "primary", 1)
local x,y = 100,200
for k=0,4 do
local a,b,c,d = getPedTask ( localPlayer, "primary", k )
dxDrawText ( "Primary task #"..k.." is "..tostring(a).." -> "..tostring(b).." -> "..tostring(c).." -> "..tostring(d).." -> ", x, y )
y = y + 15
end
y = y + 15
for k=0,5 do
local a,b,c,d = getPedTask ( localPlayer, "secondary", k )
dxDrawText ( "Secondary task #"..k.." is "..tostring(a).." -> "..tostring(b).." -> "..tostring(c).." -> "..tostring(d).." -> ", x, y )
y = y + 15
end
end
addEventHandler ( "onClientRender", root, displayMyTask ) |
Would you still continue the jump but without an animation or would the jump be cut off and instead of making the jump you will fall straight down? |
I do not know about jumping while in air do you mean jump after an object then fall in air? |
I mean, you jump then immediately after you kill the task. What would happen? Would the jump finish but without animation or would it freeze in the air for a small time and then fly straight down? |
you better test it than explain 😅 |
@@ -41,6 +41,13 @@ enum | |||
ABORT_PRIORITY_IMMEDIATE | |||
}; | |||
|
|||
enum taskType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be consistent with another code. eTaskType
. It's not a part of hungarian notation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so what letter e reference to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enumeration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we can use hungarian notation with enums?
I mean I don't see any benefits of using that format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we can use hungarian notation with enums? I mean I don't see any benefits of using that format
Using e for enumartion is not considered Hungarian notation, it's a different principle and a practiced used in all code
killPedTask(ped, string taskType, int taskNumber, [bool gracefully = true])
issue related #3806
exmaple kill jump task