SA-MP Forums Archive
/chat on PlayerTextMessage - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /chat on PlayerTextMessage (/showthread.php?tid=76888)



/chat on PlayerTextMessage - Shellegg - 07.05.2009

How do i add that anim on player talking IC but with a timer, like if the palyer only say yes he will only do the anim for 1 sec.

How can i do it?

Shellegg


Re: /chat on PlayerTextMessage - MenaceX^ - 07.05.2009

ApplyAnimation, SetTimerEx, ClearAnimations.


Re: /chat on PlayerTextMessage - Shellegg - 07.05.2009

Isn't it more easy if i add something with characters?

Like if message have 3 characters

ApplyAnimation with timer for 1 sec and then clear.


Can i have an example of this?


Re: /chat on PlayerTextMessage - MenaceX^ - 07.05.2009

Oh sure, use strlen.


Re: /chat on PlayerTextMessage - Shellegg - 07.05.2009

example?


Re: /chat on PlayerTextMessage - Shellegg - 08.05.2009

anyone?
teach me how to script defining characters?


Re: /chat on PlayerTextMessage - MenaceX^ - 08.05.2009

People here are not teachers, we just help you fix your code..

Where do you want to use it, OnPlayerText?


Re: /chat on PlayerTextMessage - Shellegg - 08.05.2009

yes, i have an ideia, but i dont know the "variable"
like this

pawn Код:
public OnPlayerTextMessage
{
  if(MessageCharacter <= 3)
  {
    SetTimerEx(.....)
  }
  else if(MessageCharacter <= 6)
  {
    SetTimerEx(.....)
  }
  return 1
}


Like this?


Re: /chat on PlayerTextMessage - Shellegg - 08.05.2009

alo?


Re: /chat on PlayerTextMessage - yom - 08.05.2009

pawn Код:
if (strlen(text) <= 3)