Error help
#9

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(carshopdentry{playerid}) // check if player in checkpoint or what
    {
        switch(carshopdentry{playerid})
        {
            case CARSHOPBOX: // main menu like 1. cars 2. bikes
            {
                switch(strval(text))
                {
                    case 0:  /// here if he selects 1 then it should show this to player
                    {
                        //Show your guns textdraw here.
                        TextDrawShowForPlayer(playerid, CARSHOPBOX);
                        TextDrawShowForPlayer(playerid, vehicleshop);
                    }
                    case 1: here if he selects 2 then it should show this to player
                    {
                        //Show your food textdraw here.
                        TextDrawShowForPlayer(playerid, CARSHOPBOX);
                        TextDrawShowForPlayer(playerid, bikeshop);
                    }
                }
            }
            case vehicleshop://If they selected the car i mean '1' = cars  textdraw,  
            {
                switch(strval(text))//Switch through the number they type in.
                {
                    case 0: GivePlayerWeapon(playerid,22,50); // dnt mind this weapon i just checking it i will change it later and give vehicle to player  
                }
            }
            case bikeshop:
            {
                switch(strval(text))//Switch through the number they type in.
                {
                    case 0: GivePlayerWeapon(playerid,31,50);//Give the player the weapon they typed the option for
                }
            }
        }
        return 0;
    }
the problem was that you used case 1 as the first case but the 1 case is actually 0.
Reply


Messages In This Thread
Error help - by sscarface - 10.06.2015, 01:29
Re: Error help - by DarkLored - 10.06.2015, 01:53
Re: Error help - by sscarface - 10.06.2015, 02:25
Re: Error help - by Dangjai - 10.06.2015, 03:01
Re: Error help - by sscarface - 10.06.2015, 03:08
Re: Error help - by Dangjai - 10.06.2015, 03:11
Re: Error help - by J0sh... - 10.06.2015, 03:27
Re: Error help - by sscarface - 10.06.2015, 03:30
Re: Error help - by DarkLored - 10.06.2015, 03:34
Re: Error help - by AlexBlack - 10.06.2015, 03:52

Forum Jump:


Users browsing this thread: 3 Guest(s)