#1

can anyone help tranform this into when he spawns one it destroy's the old one?
otherwise they can spam it
pawn Код:
dcmd_v(playerid,params[])
{
        new Float:x, Float:y, Float:z;

        if(!strlen(params)) return SendClientMessage(playerid, l_red, "USAGE : /vehicle [Vehicle name]");

        new vehicle = GetVehicleModelIDFromName(params);

        if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, l_red, "ERROR : That vehicle name was not found");
        if(vehicle == 432) return SendClientMessage(playerid, red, "You cant use that car");
        if(vehicle == 425) return SendClientMessage(playerid, red, "You cant use that helicopter");
        if(vehicle == 520) return SendClientMessage(playerid, red, "You cant use that plane");
        new Float:a;
        GetPlayerFacingAngle(playerid, a);
        GetPlayerPos(playerid, x, y, z);

        if(IsPlayerInAnyVehicle(playerid) == 1)
        {
            GetXYInFrontOfPlayer(playerid, x, y, 8);
        }
        else
        {
            GetXYInFrontOfPlayer(playerid, x, y, 5);
        }

        new PlayersVehicle = CreateVehicle(vehicle, x, y, z, a+90, -1, -1, -1);
        LinkVehicleToInterior(PlayersVehicle, GetPlayerInterior(playerid));
        PutPlayerInVehicle(playerid, PlayersVehicle, 0);
        return 1;
}
Reply


Messages In This Thread
help - by dark_clown - 31.10.2010, 19:37
Re: help - by Bessensap - 31.10.2010, 19:40
Re: help - by [P4] - 31.10.2010, 19:42
Re: help - by Bessensap - 31.10.2010, 19:44
Re: help - by dark_clown - 31.10.2010, 19:44
Re: help - by Bessensap - 31.10.2010, 19:46
Re: help - by dark_clown - 31.10.2010, 20:07

Forum Jump:


Users browsing this thread: 2 Guest(s)