07.04.2010, 01:01
hello, i have little problem i made a textdraw that is for stopping anims it read "please press enter to stop anims" however when i use this,
it turns my fs into an anti-jump lol
i read on wiki that KEY_SECONDARY_ATTACK is return/enter so i dont know why it stops me from jumping if i remove that bit its fine i can jump again.
if theres no way around that could someone give me a small example how i could put a timer on the textdraw so it dissapears after x amount of time? only been coding about a month (well mainly reading) so sorry for noob question and thanks for ur help.
edit:lol i didnt say exactly what the problem was, once my textdraw is on screen i need it so u can press enter to remove it and still b able to jump or if theres a way to make the text dissapear when the anim clears automaticly many thanks in advance
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_SPRINT || KEY_SECONDARY_ATTACK )) //stops me from being able to sprint or jump
{
ClearAnimations(playerid);
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
}
return 1;
}
i read on wiki that KEY_SECONDARY_ATTACK is return/enter so i dont know why it stops me from jumping if i remove that bit its fine i can jump again.if theres no way around that could someone give me a small example how i could put a timer on the textdraw so it dissapears after x amount of time? only been coding about a month (well mainly reading) so sorry for noob question and thanks for ur help.
edit:lol i didnt say exactly what the problem was, once my textdraw is on screen i need it so u can press enter to remove it and still b able to jump or if theres a way to make the text dissapear when the anim clears automaticly many thanks in advance



cratch that problem not fixed now i cant use vehicles. so if anyone could tell me how i could hide the textdraw after a certain amount of time or when u hit enter, without intefering with any controls i appreciate any help thanks again lol