Gyorsan összedobtam, remélem mûködik is.
new bool:kezifek[MAX_VEHICLES];
new Float: x[MAX_VEHICLES], Float: y[MAX_VEHICLES], Float: z[MAX_VEHICLES], Float: Fordulas[MAX_VEHICLES];
forward Kezifek();
public OnFilterScriptInit()
{
SetTimer(\"Kezifek\", 1000, true);
return 1;
}
CMD:kezifek(playerid, params[])
{
new vehicleid = GetPlayerVehicleID(playerid);
if(kezifek[vehicleid] == false)
{
GetVehiclePos(vehicleid, x[vehicleid], y[vehicleid], z[vehicleid]);
GetVehicleZAngle(vehicleid, Fordulas[vehicleid]);
kezifek[vehicleid] = true;
} else kezifek[vehicleid] = false;
return 1;
}
public Kezifek()
{
new Float: xx, Float: yy, Float: zz;
for(new veh; veh<MAX_VEHICLES; veh++)
{
if(kezifek[veh] == true)
{
GetVehiclePos(veh, xx, yy, zz);
if(xx != x[veh], yy != y[veh], zz != z[veh])
{
SetVehiclePos(veh, x[veh], y[veh], z[veh]);
SetVehicleZAngle(veh, Fordulas[veh]);
}
}
}
return 1;
}