Freeze car in air?
#2

I use something like this(using zCMD)


EDIT: wasn't paying attention while posting it, I'm not sure if there are a function for that but heres a simple way of freezing a vehicle and unfreezing in air or any other position.
pawn Код:
new
    isfrozen[MAX_PLAYERS],
    ftimer[MAX_PLAYERS];

CMD:freezecar(playerid,params[])
{

    if(isfrozen[playerid] == 1)
    {
        KillTimer(ftimer[playerid]);
        isfrozen[playerid] = 0;
        SCM(playerid,COLOR_LIGHTRED,"Your vehicle has been unfrozen!");
    }
    else if(isfrozen[playerid] == 0 || !isfrozen[playerid])
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
        ftimer[playerid] = SetTimerEx("freeze",1,1,"i",playerid);
        isfrozen[playerid] = 1;
        SCM(playerid,COLOR_LIGHTRED,"Your vehicle has been frozen!");
    }
   
    }
    return 1;
}

forward freeze(playerid);
public freeze(playerid)
{
    SetVehicleVelocity(GetPlayerVehicleID(playerid),0,0,0);
    return 1;
}
Reply


Messages In This Thread
Freeze car in air? - by oliverrud - 17.11.2011, 11:46
Re: Freeze car in air? - by moadi - 17.11.2011, 12:07
Re: Freeze car in air? - by oliverrud - 19.11.2011, 00:44
Re: Freeze car in air? - by MP2 - 19.11.2011, 01:40
Re: Freeze car in air? - by oliverrud - 19.11.2011, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)