[Help] yom_buttons.
#1

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.
Reply
#2

Do it yourself..
OnPlayerKeyStateChange
Check if player stands near a place.
Reply
#3

What do you want to do exactly, vinewood?
Reply
#4

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.
Reply
#5

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.
Reply
#6

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
Reply
#7

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..
Reply
#8

Problem solved thanks to 0rb.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)