[debug] Run time error 4: "Array index out of bounds"
#8

Код:
COMMAND:myvehicles(playerid, params[])
{
	new bool:found = false, msg[256];
	for(new i = 0; i < MAX_VEH; i++)
	{
		if(!Vehicles[i][vehStatus]) continue;
		
		if(Vehicles[i][vehOwner] == Player[playerid][pID])
		{
                        new vehicleid = Vehicles[i][vehID], modelid = GetVehicleModel(vehicleid);

			found = true;

                        format(msg, sizeof(msg), "%s ID : "CHAT_YELLOW"%d"CHAT_WHITE"\n", vehicleNames[modelid - 400], vehicleid);
		}
	}
	if(found)
	{
		if(Player[playerid][english])
			ShowPlayerDialog(playerid, DIALOG_MYVEHICLES, DIALOG_STYLE_LIST, "My Vehicles", msg, "Choose", "Cancel");
		else
			ShowPlayerDialog(playerid, DIALOG_MYVEHICLES, DIALOG_STYLE_LIST, "Mobil Saya", msg, "Pilih", "Batal");
	}
	else
	{
		if(Player[playerid][english])
			Server(playerid, "You didn't have any vehicles.");
		else
			Server(playerid, "Kamu tidak memiliki kendaraan.");
	}
	return 1;
}
try this
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)