12.12.2019, 01:21
Hello, i'm new with scripting and I can't actually code but i've succeeded on fixing bugs instead, you know it's all about switching values 1 to 0 and shit.. things like that
Anyways, this is my respawncar cmd from Horizon script, how can I make it not respawn used cars?
Anyways, this is my respawncar cmd from Horizon script, how can I make it not respawn used cars?
PHP Code:
CMD:respawncars(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}
new string[128], radius;
if(sscanf(params, "d", radius)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /respawncars [radius]");
if(radius < 1 || radius > 99999999)
{
SendClientMessage(playerid, COLOR_WHITE, "Radius must be higher than 0 and lower than 41!");
return 1;
}
RespawnNearbyVehicles(playerid, radius);
format(string, sizeof(string), "You have respawned all vehicles within a radius of %d.", radius);
SendClientMessage(playerid, COLOR_GREY, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
}
return 1;
}