Button? - 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: Button? (
/showthread.php?tid=152539)
Button? -
TKZ227 - 04.06.2010
I have seen on servers were you can press a button, like a fire-*ALARM button, and then a gate opens. I know how to move object and stuff, but how do I make it so when I press the button it does something?
Re: Button? -
Mokerr - 04.06.2010
Which button? you mean keys? Like SPACEBAR or ENTER?
Re: Button? -
TKZ227 - 04.06.2010
No, an actual button on a wall you can press.
Re: Button? -
Kyle_Johnson - 04.06.2010
Hmm.....
It's probably puts there pos facing the button, throws a anim on it, on the enter key, then the door opens.
Re: Button? -
TKZ227 - 04.06.2010
Oh, ok. Makes sense. Seems like a lot of work. I have another question, how do I get animations onto my server, and add them into the script so when they do something, it will do an animation.
and also, how do I make it so when they press a certain button something happens?
Re: Button? -
nakashor - 04.06.2010
Quote:
Originally Posted by [SARP
Michael Williams ]
Oh, ok. Makes sense. Seems like a lot of work. I have another question, how do I get animations onto my server, and add them into the script so when they do something, it will do an animation.
and also, how do I make it so when they press a certain button something happens?
|
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
pawn Код:
if(newkeys == KEY_JUMP)
{
SendClientMessage(playerid,COLOR,"You have pressed JUMP BUTTON");
}
Good luck.
Re: Button? -
TKZ227 - 04.06.2010
Is there a list of keys?
Re: Button? -
Calgon - 04.06.2010
It's a filterscript that was made by 0rb,
http://www.******.co.uk/search?q=yom..._en-GB___GB374
I have the PWN for it somewhere but I don't want to upload it as I can't be bothered to find it.