31.07.2011, 15:35
(
Последний раз редактировалось KfirRP; 31.07.2011 в 16:07.
)
pawn Код:
if(strcmp(cmd, "/vList", true) == 0 || strcmp(cmd, "/carlist", true) == 0) -- Does not work - "Unknown cmd"
{
new car[256], string[256];
format(string, 256, "Users/%s.txt", plname);
if(dini_Int(string, "CarsOwned") == 0) return SendClientMessage(playerid, -1, ""#COLOR_GREY"You do not own any car.");
if(dini_Int(string, "Car1") > 0)
{
format(car, 256, "Vehicles/Car%d.txt", dini_Int(string, "Car1"));
if(!dini_Exists(car)) return SendClientMessage(playerid, -1, ""#COLOR_GREY"Error occoured (error #04)");
new msg[256];
format(msg, 256, ""#COLOR_MAGENTA"[CARINFO]Model: "#COLOR_RED"%s(%d)||"#COLOR_MAGENTA"Spawned:%d||Anyone in: %d||Price: %d", GetVehicleNameFromID(dini_Int(car, "Model")), dini_Int(car, "Model"), dini_Int(car, "Spawned"), AnyOneIn[dini_Int(string, "Car1")], dini_Int(car, "Price"));
SendClientMessage(playerid, -1, msg);
}
if(dini_Int(string, "Car2") > 0)
{
format(car, 256, "Vehicles/Car%d.txt", dini_Int(string, "Car2"));
if(!dini_Exists(car)) return SendClientMessage(playerid, -1, ""#COLOR_GREY"Error occoured (error #04)");
new msg[256];
format(msg, 256, ""#COLOR_MAGENTA"[CARINFO]Model: "#COLOR_RED"%s(%d)||"#COLOR_MAGENTA"Spawned:%d||Anyone in: %d||Price: %d", GetVehicleNameFromID(dini_Int(car, "Model")), dini_Int(car, "Model"), dini_Int(car, "Spawned"), AnyOneIn[dini_Int(string, "Car2")], dini_Int(car, "Price"));
SendClientMessage(playerid, -1, msg);
}
if(dini_Int(string, "Car3") > 0)
{
format(car, 256, "Vehicles/Car%d.txt", dini_Int(string, "Car3"));
if(!dini_Exists(car)) return SendClientMessage(playerid, -1, ""#COLOR_GREY"Error occoured (error #04)");
new msg[256];
format(msg, 256, ""#COLOR_MAGENTA"[CARINFO]Model: "#COLOR_RED"%s(%d)||"#COLOR_MAGENTA"Spawned:%d||Anyone in: %d||Price: %d", GetVehicleNameFromID(dini_Int(car, "Model")), dini_Int(car, "Model"), dini_Int(car, "Spawned"), AnyOneIn[dini_Int(string, "Car3")], dini_Int(car, "Price"));
SendClientMessage(playerid, -1, msg);
}
SendClientMessage(playerid, -1, "(Spawned is set to 0?Veh is spawned/Anyone in is set to 1?Someone is in the car)");
return 1;
}