18.03.2013, 13:41
I need a command like /suicide that will destroy my car completely, not just set it's health to 0 or cause a little explosion, i want the car to get destroyed.
I use ZCmd.
I use ZCmd.
CMD:suicide(playerid, params[])
{
return DestroyVehicle(GetPlayerVehicleID(playerid));;
}
CMD:suicide(playerid, params[])
{
if(gTeam[playerid] == T_TALIBAN)
{
return DestroyVehicle(GetPlayerVehicleID(playerid));
}
else return SendClientMessage(playerid, 0xFF0000FF, "You must be a Taliban to use this command.");
}
CMD:suicide(playerid, params[])
{
if(gTeam[playerid] == T_IRAQ)
{
return DestroyVehicle(GetPlayerVehicleID(playerid));
}
else return SendClientMessage(playerid, 0xFF0000FF, "You must be a Taliban to use this command.");
}
CMD:suicide(playerid, params[])
{
if(gTeam[playerid] == T_IRAQ && PLAYER_STATE_DRIVER)
{
return DestroyVehicle(GetPlayerVehicleID(playerid));
}
else return SendClientMessage(playerid, 0xFF0000FF, "You must be a Taliban to use this command.");
}
else return SendClientMessage(playerid, 0xFF0000FF, "You must be a in a vehicle");
}
error 010: invalid function or declaration
else return SendClientMessage(playerid, 0xFF0000FF, "You must be a Taliban to use this command.");
}
else return SendClientMessage(playerid, 0xFF0000FF, "You must be in a vehicle");
}
}
else return SendClientMessage(playerid, 0xFF0000FF, "You must be a in a vehicle!");
return 1;
}
CMD:suicide(playerid, params[])
{
if(gTeam[playerid] == T_IRAQ )
{
new seat = GetPlayerVehicleSeat(playerid);
return 0 == seat ? DestroyVehicle(GetPlayerVehicleID(playerid)) : false;
}
else return SendClientMessage(playerid, 0xFF0000FF, "You must be a Taliban to use this command.");
}
return 0 == seat ? DestroyVehicle(GetPlayerVehicleID(playerid)) : false;