Enter / Exit
#9

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
You can't have variables as cases in a switch statement. You should save the location of the pickups in a variable and loop through it.
In PAWN you can have variables as cases.

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid) //don't know why you would use a command to enter pickups
{
    switch(pickupid)
    {
        case arrowpickup[1]:
        {
            //do stuff
        }
        case arrowpickup[2]:
        {
            //do stuff
        }
    }
}
Reply


Messages In This Thread
Enter / Exit - by vIBIENNYx - 23.05.2012, 00:38
Re: Enter / Exit - by ReneG - 23.05.2012, 01:03
Re: Enter / Exit - by vIBIENNYx - 23.05.2012, 01:42
Re: Enter / Exit - by Jonny5 - 23.05.2012, 01:45
Re: Enter / Exit - by vIBIENNYx - 23.05.2012, 01:48
Re: Enter / Exit - by Jonny5 - 23.05.2012, 01:49
Re: Enter / Exit - by vIBIENNYx - 23.05.2012, 01:52
Re: Enter / Exit - by SuperViper - 23.05.2012, 02:53
Re: Enter / Exit - by [ABK]Antonio - 23.05.2012, 06:44
Re: Enter / Exit - by vIBIENNYx - 23.05.2012, 13:08

Forum Jump:


Users browsing this thread: 1 Guest(s)