23.11.2014, 12:22
(
Последний раз редактировалось JaydenJason; 08.04.2015 в 11:33.
)
This was my first little script I made in a long while ago, meanwhile I've advanced in scripting and I had published this as I roam around quite some servers, and most of the times all the vehicles are in the most idiotic places, 50 vehicles in a small place, that's why I made this quick little thing to respawn those vehicles.
Pastebin: http://pastebin.com/1WfF9MEc
PHP код:
CMD:respawncars(playerid, params[])
{
if(IsPlayerAdmin(playerid)) // var can be changed
{
new Float:X, Float:Y, Float:Z, distance;
if(sscanf(params, "d", distance)) distance = 10;
for(new i = 0; i < MAX_VEHICLES; i++)
{
GetVehiclePos(i, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, distance, X, Y, Z))
{
SetVehicleToRespawn(i);
}
}
}
return 1;
}