[Help] Destroy car after spawned new car, didnt work!
#2

pawn Code:
if(!strcmp(cmdtext, "/car", true))
{
        new Float:up[3], carid;
        GetPlayerPos(playerid, up[0], up[1], up[2]);
        new CurrentVeh = GetPlayerVehicleID(playerid);
        DestroyVehicle(CurrentVeh);
        carid = CreateVehicle(411, up[0]+2, up[1]+2, up[2], 0, -1, -1, 0);
        PutPlayerInVehicle(playerid, carid, 0);
        LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
        SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
        SendClientMessage(playerid, 0x20C92EFF, "* You spawned a new Infernus car, you can also use the /carmenu to spawn other vehicle types.");
        return 1;
}
This will only work if you use the command /car while inside another vehicle.
Reply


Messages In This Thread
[Help] Destroy car after spawned new car, didnt work! - by mickos - 30.07.2012, 22:42
Re: [Help] Destroy car after spawned new car, didnt work! - by Max_Coldheart - 30.07.2012, 22:51
Re: [Help] Destroy car after spawned new car, didnt work! - by mickos - 30.07.2012, 23:14
Re: [Help] Destroy car after spawned new car, didnt work! - by mickos - 30.07.2012, 23:54

Forum Jump:


Users browsing this thread: 1 Guest(s)