03.08.2014, 19:58
(
Последний раз редактировалось Sarra; 03.08.2014 в 21:46.
Причина: better title
)
(I'm a beginner)
Hey I am making a command /car (engine/lights/hood/trunk)
but when I compile the compiler stops working (doesn't even compile and give errors..)
(pawno compiler library has stopped working)
Please just tell me how to fix, don't write the command in your way, give me a solution! I'm a beginner, and I'm still learning,
again: please just give me where the problem is, don't give your command
Hey I am making a command /car (engine/lights/hood/trunk)
but when I compile the compiler stops working (doesn't even compile and give errors..)
(pawno compiler library has stopped working)
Please just tell me how to fix, don't write the command in your way, give me a solution! I'm a beginner, and I'm still learning,
pawn Код:
CMD:car(playerid, params[])
{
new string[12];
new vehicleid=GetPlayerVehicleID(playerid);
new engine, lights, hood, trunk, a, d, o;
GetVehicleParamsEx(vehicleid, engine, lights, a, d, hood, trunk, o);
if (sscanf(params, "s", string)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /car [engine / lights / hood / trunk]");
else if (!strcmp(string, "engine"))
{
if (engine == 0)
SetVehicleParamsEx(vehicleid, 1, lights, a, d, hood, trunk, o);
else
SetVehicleParamsEx(vehicleid, 0, lights, a, d, hood, trunk, o);
}
else if (!strcmp(string, "lights"))
{
if (lights == 0)
SetVehicleParamsEx(vehicleid, engine, 1, a, d, hood, trunk, o);
else
SetVehicleParamsEx(vehicleid, engine, 0, a, d, hood, trunk, o);
}
else if (!strcmp(string, "hood"))
{
if (hood == 0)
SetVehicleParamsEx(vehicleid, engine, lights, a, d, 1, trunk, o);
else
SetVehicleParamsEx(vehicleid, engine, lights, a, d, 1, trunk, o);
}
else if (!strcmp(string, "trunk"))
{
if (trunk == 0)
SetVehicleParamsEx(vehicleid, engine, lights, a, d, hood, 1, o);
else
SetVehicleParamsEx(vehicleid, engine, lights, a, d, hood, 0, o);
}
return 1;
}