SA-MP Forums Archive
array with random number - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: array with random number (/showthread.php?tid=362985)



Vehicle dont want to destroy - TheDeath - 26.07.2012

I FIXED THE LAST ERROR BUT I HAVE NEW - Vehicle dont want to destroy

Here is my code:
Код:
            case DIALOG_COP_SPAWN:
            {
                switch(listitem)
                {
					case 0:
					{
						new PoliceVeh[512],id[MAX_PLAYERS],PoliceVehicleID;
						PoliceVehicleID = id[playerid];
						DestroyVehicle(PoliceVeh[PoliceVehicleID]);
						PoliceVeh[PoliceVehicleID] = CreateVehicle(597, -1622.4440,651.8917,10.1875, 90.0000, -1, -1, 100);
						PutPlayerInVehicle(playerid, PoliceVeh[PoliceVehicleID], 0);
					}
					case 1:
					{
						new PoliceVeh[512],id[MAX_PLAYERS],PoliceVehicleID;
						PoliceVehicleID = id[playerid];
						DestroyVehicle(PoliceVeh[PoliceVehicleID]);
						PoliceVeh[PoliceVehicleID] = CreateVehicle(523, -1622.4440,651.8917,10.1875, 90.0000, -1, -1, 100);
						PutPlayerInVehicle(playerid, PoliceVeh[PoliceVehicleID], 0);
					}
					case 2:
					{
						new PoliceVeh[512],id[MAX_PLAYERS],PoliceVehicleID;
						PoliceVehicleID = id[playerid];
						DestroyVehicle(PoliceVeh[PoliceVehicleID]);
						PoliceVeh[PoliceVehicleID] = CreateVehicle(599, -1622.4440,651.8917,10.1875, 90.0000, -1, -1, 100);
						PutPlayerInVehicle(playerid, PoliceVeh[PoliceVehicleID], 0);

					}
					case 3:
					{
						new PoliceVeh[512],id[MAX_PLAYERS],PoliceVehicleID;
						PoliceVehicleID = id[playerid];
						DestroyVehicle(PoliceVeh[PoliceVehicleID]);
						PoliceVeh[PoliceVehicleID] = CreateVehicle(427, -1622.4440,651.8917,10.1875, 90.0000, -1, -1, 100);
						PutPlayerInVehicle(playerid, PoliceVeh[PoliceVehicleID], 0);

					}


				}


            }
When i enter ingame it dont want to destroy the old vehicle when i spawn new.