02.08.2011, 09:33
This makes the server crash:
And this says unknown cmd:
pawn Код:
if(dini_Int(string, "Mask") == 4)
{
if(dini_Int(string, "SkiType") == 0) return SendClientMessage(playerid, -1, ""#COLOR_GREY"Choose a ski mask by /setskimask.");
if(dini_Int(string, "Masked") == 0){ dini_IntSet(string, "Masked", 1); SetPlayerAttachedObject(playerid, INDEX_SKI, 19035+dini_Int(string, "SkiType"), 2, 0.096340, 0.009089, 0.003169, 84.762901, 93.027091, 0.000000, 1.000000, 1.000000, 1.000000);format(action, 256, "**%s wears his ski-mask on.", GetName(playerid));ProxDetector(24.0, playerid, action, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);}
else if(dini_Int(string, "Masked") == 1){ dini_IntSet(string, "Masked", 0); RemovePlayerAttachedObject(playerid, INDEX_SKI);format(action, 256, "**%s puts his ski-mask off.");ProxDetector(24.0, playerid, action, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);}
}
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 on car no.1 (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 on car no.2(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 on car no.3(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;
}