How to delete a specific vehicle ID?
#1

Hello reader,

here I am, once again. It maybe looks I ask everything as soon as it doesn't work but I don't, I first try to solve it myself ( As I am new to PAWN I am spending quite a lot time on it so that is why you will still get to see so much questions from me ^^ ). Okay, that is just for the people who think like "Screw him, he just doesn't want to put any effort into it.".

Now, my question. I got a command to create vehicles, that all works fine, nothing wrong with it. Now the problem is, I tried to script a /deleteveh myself, and I sucseeded, for a part. I already got so far that I could delete the vehicle I am inside ( With the help of SA-MP Wiki :P ), but I planned to create a command to "/deleteveh [vehicleid]" ( Ofcourse the IG vehicle ID from /dl and not like ID 400 will delete all Landstalkers but that ID 1 will delete the first vehicle created in the server. ) but I can't get that to work.

Now I am also not sure if that is possible but I guess it is. This is the code I am currently using:
pawn Code:
CMD:deleteveh(playerid, params[])
{

    if (IsPlayerAdmin(playerid) == 0)
    {
    SendClientMessage(playerid, KLEUR_WIT, "You are not an Administrator.");
    return 1;
    }
    else if (isnull(params))
    {
    SendClientMessage(playerid, KLEUR_WIT, "{B4B5B7}USAGE: /deleteveh [vehicleid]");
    return 1;
    }
    else if (IsPlayerAdmin(playerid) == 1)
    {
    new vehicleid;
    vehicle =
    DestroyVehicle(vehicleid);
    if(!sscanf(params, "%i", vehicleid))
        {
        new string[128];
        format(string, sizeof(string), "You succesfully deleted vehicle ID: %i", vehicleid);
        return 1;
        }
    }
    return 1;
}
I need to know what I should put behind "vehicle = ......" because I think it will work then .

Best regards,
Jesse
Reply


Messages In This Thread
How to delete a specific vehicle ID? - by jessejanssen - 17.02.2012, 23:41
Re : How to delete a specific vehicle ID? - by ricardo178 - 18.02.2012, 00:12
Re: How to delete a specific vehicle ID? - by ReneG - 18.02.2012, 00:17
Re: How to delete a specific vehicle ID? - by Fj0rtizFredde - 18.02.2012, 00:21
Re: Re : How to delete a specific vehicle ID? - by ReneG - 18.02.2012, 00:21
Re : Re: Re : How to delete a specific vehicle ID? - by ricardo178 - 18.02.2012, 00:22
Re: How to delete a specific vehicle ID? - by Jefff - 18.02.2012, 00:32
Re: How to delete a specific vehicle ID? - by jessejanssen - 18.02.2012, 01:09

Forum Jump:


Users browsing this thread: 2 Guest(s)