[Help]Problem with OnPlayerStateChange
#8

Quote:
Originally Posted by lrZ^ aka LarzI
No you don't need a switch statement.
Switch statements are only useful if you want to check for if var is equal to more than one value

Example
pawn Код:
switch(oldstate)
{
  case PLAYER_STATE_DRIVER: { /*something*/ }
  case PLAYER_STATE_PASSENGER: { /*something else*/ }
}
If you only want to check for one state, then a switch statement isn't necesarry.
K, thnx!
Reply


Messages In This Thread
[Help]Problem with OnPlayerStateChange - by Tigerbeast11 - 14.12.2009, 16:55
Re: [Help]Problem with OnPlayerStateChange - by Martin_M - 14.12.2009, 17:02
Re: [Help]Problem with OnPlayerStateChange - by Tigerbeast11 - 14.12.2009, 17:03
Re: [Help]Problem with OnPlayerStateChange - by Martin_M - 14.12.2009, 17:07
Re: [Help]Problem with OnPlayerStateChange - by Martin_M - 14.12.2009, 17:08
Re: [Help]Problem with OnPlayerStateChange - by Tigerbeast11 - 14.12.2009, 17:11
Re: [Help]Problem with OnPlayerStateChange - by LarzI - 14.12.2009, 18:22
Re: [Help]Problem with OnPlayerStateChange - by Tigerbeast11 - 14.12.2009, 19:37
Re: [Help]Problem with OnPlayerStateChange - by LarzI - 14.12.2009, 19:44

Forum Jump:


Users browsing this thread: 6 Guest(s)