HAving trouble with Keybinds for pawno script
#10

Quote:
Originally Posted by Zach7
Посмотреть сообщение
i still don't know what do to do what do you mean by no coding and stuff ughh so frustrated
I'm not going to type the full code out for you because I don't want to be helping someone run a server on a black listed script.
So I'll just explain simple statements to you.

When creating a statement, you use the name and two parentheses "()" after that you use two curly brackets which the coding for that statement goes in. For example;

pawn Код:
cmd:thisisthename(these are the parentheses){
//Within here is where your coding goes for this statement.
}
So for what you're doing. You're using;
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {

          }
This is where your enter code will be going. But before that you have to modify your cmd.
As you have to add which key you will be using, you do this;
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
  {
      //Within here is where your enter code is going.

   }
So all you would need to do is take away the cmd line and the ending bracket but keep your enter code.

pawn Код:
cmd:thisisthename(these are the parentheses){
//take away what's on top and the bracket below. and where i am typing will be your /enter code
}
So your final result will be;

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
   
     
if(newkeys == KEY_SECONDARY_ATTACK)
  {

   //ALL YOUR ENTER CODE WILL GO IN HERE.
   // Which means when you press ENTER you will enter a building.

} // this bracket is closing the if(){} statemnet
} // this bracket is closing the public OnPlayerKeyStateChange
Try and learn at least JavaScript before trying to script in Pawno, it uses a lot of advanced programming.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)