13.10.2013, 22:37
Alguйm pode me ajudar neste warning?
Cуdigo todo:
Linha:
Cуdigo todo:
PHP Code:
Dialog_MafiaSelectLoad(playerid, response)
{
// Setup local variables
new TotalMafiaStartLocList[1000], ProductList[50], NumProducts;
// Just close the dialog if the player clicked "Cancel"
if(!response) return 1;
// First get the list of products again, so we can retrieve the selected load from it
switch (GetVehicleModel(GetPlayerVehicleID(playerid))) // Check the vehicle-model of the player
{
case VehicleSandKing, VehicleMoonbeam: // If the player's vehicle is a "Flatbed" or "DFT-30"
ProductList = Product_GetList(PCV_MafiaVan, NumProducts); // Build a list of products defined for truckers without a trailer
}
}
// Store the selected LoadID in the player's account
APlayerData[playerid][LoadID] = ProductList[listitem];
ProductID = APlayerData[playerid][LoadID];
// Build a list of start-locations for this product
for (new i; i < 30; i++)
{
// Get the location-id
LocID = ALoads[ProductID][FromLocations][i];
// Check if it a valid location-id (not 0)
if (LocID != 0)
format(TotalMafiaStartLocList, 1000, "%s%s\n", TotalMafiaStartLocList, ALocations[LocID][LocationName]); // Add the location-name to the list
else
break; // As soon as an invalid location-id has been found, stop adding entries to the location-list
}
// Ask the player to choose a start-location
ShowPlayerDialog(playerid, DialogMafiaStartLoc, DIALOG_STYLE_LIST, TXT_MafiaDialogSelectStartLoc, TotalMafiaStartLocList, TXT_DialogButtonSelect, TXT_DialogButtonCancel); // Let the player choose a starting location
return 1;
}
PHP Code:
new TotalMafiaStartLocList[1000], ProductList[50], NumProducts;