Despawn vehicle by ID?
#1

I'm pretty new to scripting, and I need a basic command to despawn a vehicle by its ID. For instance, /despawnveh 103 would despawn the 103 vehicle on the server. And if possible, I need the command to tell me what vehicle has despawned by its name.

Basically this:

/despawnveh 103
"You have despawned a Maverick."
Reply
#2

Try this:

pawn Код:
CMD:despawnveh(playerid, params[])
{
    static
        id,
        str[32];

    if (isnull(params))
        return SendClientMessage(playerid, -1, "Usage: /despawnveh <id>");

    DestroyVehicle((id = strval(params)));
    format(str, sizeof(str), "You have despawned vehicle ID: %d.", id);

    return SendClientMessage(playerid, -1, str);
}
If you want the one for vehicle names, say so.
Reply
#3

Thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)