Error help
#1

I'm using this. and trying to make car shop.

Like this:

if player enter in checkpoint he gets main menu for example like:

1. Cars
2. Bikes

if he select cars by type '1' then another textdraw will be opened like

1. infernus
2. bullet

if he selects by type '2' bike then another textdraw will be opened like

1. FCR
2.PCJ


here's my code.

PHP код:
public OnPlayerText(playeridtext[])
{
    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 
1:  /// here if he selects 1 then it should show this to player
                    
{
                        
//Show your guns textdraw here.
                        
TextDrawShowForPlayer(playeridCARSHOPBOX);
                        
TextDrawShowForPlayer(playeridvehicleshop);
                    }
                    case 
2here if he selects 2 then it should show this to player
                    
{
                        
//Show your food textdraw here.
                        
TextDrawShowForPlayer(playeridCARSHOPBOX);
                        
TextDrawShowForPlayer(playeridbikeshop);
                    }
                }
            }
            case 
vehicleshop://If they selected the car i mean '1' = cars  textdraw, 
            
{
                switch(
strval(text))//Switch through the number they type in.
                
{
                    case 
1GivePlayerWeapon(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 
1GivePlayerWeapon(playerid,31,50);//Give the player the weapon they typed the option for
                
}
            }
        }
        return 
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: 1 Guest(s)