/destroyveh admin
#2

I can't really understand your system, but I have this scripted.
Quote:

CMD:destroycar(playerid, params[])
{
if(!CheckAdmin(playerid, ADMIN_LEVEL_1)) return NotAuthMSG(playerid);
if(!PlayerInCar(playerid)) return NotInCarMSG(playerid);
format(msg, sizeof(msg), "You've destroyed vehicle ID: %d.", GetPlayerVehicleID(playerid));
SCM(playerid, COLOR_GRAD4, msg);
DestoryCar(GetPlayerVehicleID(playerid));
return 1;
}

Quote:

if(strcmp(cmd, "/destroycar", true)== 0)
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(!vehenabled)
return SendClientMessage(playerid, GREY, "/veh was disabled by executive staff.");
new currentVehicle = GetPlayerVehicleID(playerid);
if(currentVehicle == 0) return SendClientMessage(playerid,GREY, " You must be in a vehicle to destroy it.");
new check;
for(new i = 0; i < sizeof(CreatedCars); i++)
{
if(CreatedCars[i] == currentVehicle)
{
check = 1;
CreatedCars[i] = INVALID_VEHICLE_ID;
break;
}
}
if(!check) return SendClientMessage(playerid, GREY, " You may only destroy a vehicle that was created with /veh.");

gDestroyVehicle[currentVehicle] = 1;
RemoveSiren(currentVehicle);
SetVehicleToRespawn(currentVehicle);
return 1;
}
else
{
SendClientMessage(playerid, GREY, " You are not authorized to use that command.");
}
}

Quote:

CMD:destroycars(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 4) {
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
return 1;
}
for(new i = 0; i < sizeof(CreatedCars); i++) {
if(CreatedCars[i] != INVALID_VEHICLE_ID) {
DestroyVehicle(CreatedCars[i]);
CreatedCars[i] = INVALID_VEHICLE_ID;
}
}
SendClientMessageEx(playerid, COLOR_GREY, " Created vehicles destroyed!");
return 1;
}

Reply


Messages In This Thread
/destroyveh admin - by Pilip93 - 06.07.2013, 19:56
Re: /destroyveh admin - by FGHosting - 06.07.2013, 20:03
Re: /destroyveh admin - by Pilip93 - 06.07.2013, 20:10
AW: /destroyveh admin - by Blackazur - 06.07.2013, 22:57
Re: /destroyveh admin - by CAR - 06.07.2013, 23:10
Re: /destroyveh admin - by Pilip93 - 06.07.2013, 23:22
Re: /destroyveh admin - by CAR - 06.07.2013, 23:28
Re: /destroyveh admin - by Pilip93 - 07.07.2013, 00:21
Re: /destroyveh admin - by CAR - 07.07.2013, 00:30
Re: /destroyveh admin - by Pilip93 - 07.07.2013, 00:44

Forum Jump:


Users browsing this thread: 2 Guest(s)