19.04.2013, 23:45
(
Последний раз редактировалось jakejohnsonusa; 20.04.2013 в 00:37.
)
Ok so I have a dialog that shows all vehicles that have a driver along with some stats on the cars. The problem I have is that I can't add anymore without the command not working (even when I do a \n).
Here is what works:
I want to add more info (such as Engine status) to the the line, but I can't without getting "Server: Unknown Command," my server's scripts stock error message.
Here is what works:
pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++) // MY WIP Police Vehicle Info system. Includes Health, driver, passengers, Location?, and Veh ID
{
if(IsACopCar(i))//All Cop Cars
{
for(new q = 0; q < MAX_PLAYERS; q++) {
if(IsPlayerInVehicle(q, i))//All Cop Cars with People in the vehicle
{
if(GetPlayerVehicleSeat(q) == 0)//All cop cars with a driver
{
new vehicle[24];
new player[268];
new Float:engine;
GetVehicleHealth(i, engine);
new Float:currenthealth;
currenthealth = engine / 10;
GetVehicleName(i, vehicle, sizeof(vehicle));
new zone[MAX_ZONE_NAME];
GetVehicle2DZone(i, zone, MAX_ZONE_NAME);
//new atext[20];
//if(gEngine[i] == 1) { atext = "ON"; }
//else if(gEngine[i] == 0) { atext = "OFF"; }
format(player, sizeof(player), "Vehicle: %s (%d) | Gov ID: %d | Driver: %s (%d) | Health: %.1f % | Location: %s\n", vehicle, GetVehicleModel(i), i, Nick(q), q, currenthealth, zone);// Want to add more stuff here...
//format(player, sizeof(player), "Vehicle: %s (%d) | Gov ID: %s | Driver: %s (%d) | Health: %d | Location: %s\n", vehicle, GetVehicleModel(i), i, Nick(q), q, currenthealth, zone);
strins(string, player, strlen(string), sizeof(string));
}
}
}
}
}
ShowPlayerDialog(playerid, 1592, DIALOG_STYLE_MSGBOX, "Current Occupied Vehicles", string, "Close", "");
strdel(string, 0, strlen(string));
}