[Help] yom_buttons. - 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: [Help] yom_buttons. (
/showthread.php?tid=74902)
[Help] yom_buttons. -
vinewood - 27.04.2009
Somebody could help me not think about anything yom_buttons, such as buttons create the animation when the player presses the keyboard. could someone post an example? excuse my ignorance.
sorry for my bad english.
Re: [Help] yom_buttons. -
MenaceX^ - 27.04.2009
Do it yourself..
OnPlayerKeyStateChange
Check if player stands near a place.
Re: [Help] yom_buttons. -
yom - 27.04.2009
What do you want to do exactly, vinewood?
Re: [Help] yom_buttons. -
vinewood - 27.04.2009
I wanted to make a
button with an object
2886 (keypad). as the player presses enter he moves to the button presses the button through the animation
( "HEIST9", "Use_SwipeCard"), then he asks if the player and the
FBI if he it opens a door if not send a message that can not
enter.

Re: [Help] yom_buttons. -
yom - 27.04.2009
Do you use my script, or you want to reproduce how i did it?
If using my script, if i remember it will be something like this, in your gamemode:
pawn Code:
public OnPlayerPressButton(playerid, buttonid)
{
if (buttonid == button_id_of_this_door)
{
if (Team[playerid] == TEAM_FBI)
//open door
else
//send message "You aren't an agent of the FBI!"
return true;
}
return false;
}
If you want to reproduce, look the script and copy what you want.. it's simple to understand.
Re: [Help] yom_buttons. -
vinewood - 27.04.2009
I appreciate the help friend. But it did not work.

I got so far to develop this.
Code:
#include <yom_buttons>
new butao;
butao = CreateButton(244.83, 74.28, 1004.1,0.0,0.0,0.0,true);
public OnPlayerPressButton(playerid, buttonid)
{
if (buttonid == butao)
{
if(gTeam[playerid] == 2)
{
SendClientMessage(playerid, COLOR_ALLDEPT, "OK");
}
else
{
SendClientMessage(playerid, COLOR_ALLDEPT, "NOP");
}
return true;
}
return false;
}
This is the latest of yom_buttons inc?
http://pastebin.com/m2b9487a9 or that?
http://pastebin.com/m21f9bc89
Re: [Help] yom_buttons. -
yom - 27.04.2009
Are you sure the filterscript is loaded and running? The FS should be loaded before any scripts that use CreateButton.
Send me your whole script by pm if you want..
Re: [Help] yom_buttons. -
vinewood - 28.04.2009
Problem solved thanks to 0rb.