:work with switch
#1

i tried to use switch here but it doesnt work at all.

PHP код:
YCMD:work(playeridparams[], help)
{
    if(
IsWorking[playerid] == 1) return SendClientMessage(playeridCOLOR_WHITE"Already working.");
    for(new 
1MAX_JOBSj++) 
    {
        if(
PlayerToPoint(3.0playeridJobInfo[j][jPosX], JobInfo[j][jPosY], JobInfo[j][jPosZ]) && != 7
        {
            switch(
j)
            {
                case 
1:
                {
                }
                case 
2:
                {
                    
PWarehouseCP[playerid] = 2;
                    
PWarehouseCurrent[playerid] = 0;
                    
IsWorking[playerid] = 1;
                    new 
randn random(sizeof(WarehouseExteriorCP));
                    
SetPlayerCheckpoint(playeridWarehouseExteriorCP[randn][0], WarehouseExteriorCP[randn][1], WarehouseExteriorCP[randn][2], 1.0);
                    
SetDestination(playeridWarehouseExteriorCP[randn][0], WarehouseExteriorCP[randn][1], WarehouseExteriorCP[randn][2]);
                }
                case 
3:
                {
                }
                case 
4:
                {
                }
                case 
5:
                {
                
                    
ShowPlayerDialog(playeridDIALOG_TRUCKERDIALOG_STYLE_TABLIST_HEADERS"Choose the transport type""Type\tLegal/Illegal\tAvailable routes\tReward\nFood\tLegal\t25\t{4AE87D}${FFFFFF}\nElectronics\tLegal\t25\t{4AE87D}${FFFFFF}\nGas/Petrol\tLegal\t15\t{4AE87D}${FFFFFF}\nCar Theft\tIllegal\t2\t{4AE87D}${FFFFFF} + {F37138}special rewards{FFFFFF}""Choose""Cancel");
                    new 
randn random(sizeof(TruckStart));
                    
VJob[playerid] = CreateVehicle(515TruckStart[randn][0], TruckStart[randn][1], TruckStart[randn][2], TruckStart[randn][3], -1, -1, -1);
                    
PutPlayerInVehicle(playeridVJob[playerid], 0);
                    
IsWorking[playerid] = 1;
                    
SetDestination(playerid2502.9927,2778.0164,10.8203);
                    
ShowJobBox(playerid);
                    
UpdateJobBox(playerid);
                
                }
            }
        
        }
    }
    return 
1;

any ideas?
Reply


Messages In This Thread
:work with switch - by PepsiCola23 - 24.02.2018, 20:28
Re: :work with switch - by RogueDrifter - 24.02.2018, 20:30
Re: :work with switch - by PepsiCola23 - 24.02.2018, 20:34
Re: :work with switch - by kingmk - 24.02.2018, 21:24
Re: :work with switch - by PepsiCola23 - 24.02.2018, 21:35
Re: :work with switch - by AdamsLT - 25.02.2018, 08:00
Re: :work with switch - by kingmk - 25.02.2018, 08:33
Re: :work with switch - by PepsiCola23 - 25.02.2018, 08:55
Re: :work with switch - by kingmk - 25.02.2018, 08:56
Re: :work with switch - by PepsiCola23 - 25.02.2018, 09:10

Forum Jump:


Users browsing this thread: 2 Guest(s)