OnPlayerKeyStateChange returning
#2

When you want to return the statement, typicall when your code ends.
For example,
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
     if(newkeys & KEY_FIRE))
     {
           if(player_idle_status == true)
           {
                 player_idle_status[playerid] = false;
                 return 1;
           }
           return 1;
     }
     return 1;
}
As you can see, we typically return a value when needed, and or when our code is over.
Reply


Messages In This Thread
OnPlayerKeyStateChange returning - by rOps - 30.01.2015, 20:09
Re: OnPlayerKeyStateChange returning - by Abagail - 30.01.2015, 20:13
Re: OnPlayerKeyStateChange returning - by CalvinC - 30.01.2015, 20:16
Re: OnPlayerKeyStateChange returning - by rOps - 30.01.2015, 20:17
Re: OnPlayerKeyStateChange returning - by Abagail - 30.01.2015, 20:47

Forum Jump:


Users browsing this thread: 1 Guest(s)