19.03.2012, 00:19
Can this command be improved? Some of my community say it lags for them when they type it.
Also how can I actually improve things myself so they run better? I look at codes and think, could this be improved? But I have no idea how to. Thanks.
pawn Код:
CMD:engine(playerid, params[])
{
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine == 1) {
SetVehicleParamsEx(vid, 0, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid, COLOR_ORANGE, "INFO: {FFFFFF}Engine off.");
}
else {
SetVehicleParamsEx(vid, 1, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid, COLOR_ORANGE, "INFO: {FFFFFF}Engine on.");
}
return 1;
}