dcmd_dv(playerid, params[])
{
#pragma unused params
new vehicleid;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_WHITE,"SERVER: Unknown command");
else if(!IsPlayerInVehicle(playerid, vehicleid)) return SendClientMessage(playerid,COLOR_RED,"ERROR:You Must Be In A Vehicle");
if(IsPlayerAdmin(playerid))
if(IsPlayerInVehicle(playerid, vehicleid))
{
SendClientMessage(playerid,COLOR_RED,"Vehicle Removed");
return DestroyVehicle(GetPlayerVehicleID(playerid));
}
return 1;
}
ok so i was making some commands but got a problem all other commands are working but not this one i want to make a command like /dv to destroy vehicle only for admins so if a player use it he gets unknown command message which is fine and when an admin use it on foot he gets ERROR:You Must Be In A Vehicle and if he use it in vehicle the vehicle is removed and he gets Vehicle Removed message
i tried doing everything i know but still getting error in this i get You Must Be In A Vehicle error even if i am in vehicle