textdraw help
#1

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,
Код:
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;
}
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
Reply
#2

is this possible? il settle for a client message for now it baffles that me i cant jump if i use that bit of script
Reply
#3

dont do double post
wait to someone to reply :P
Reply
#4

Open up gl_actions and see how they do it. It comes with the server, in the filterscripts folder.
Reply
#5

thanks i found that if i change it to
Код:
if ((newkeys & KEY_UP || KEY_DOWN || KEY_LEFT || KEY_RIGHT))
i get what i needed i still cant figure out y tho lol

editcratch 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

Quote:

dont do double post
wait to someone to reply :P

sorry wont do it again new to forums i should have read the rules
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)