DestroyVehicle
#8

Quote:
Originally Posted by dugi
Your script is wrong then.
I don't see how, I mean it worked fine in 0.2x O.o ...

Ok let me take you through this:

Firstly the command is used
pawn Код:
dcmd_destroycar(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 5)
    {
      EraseVehicle(GetPlayerVehicleID(playerid));
      return 1;
    }
    else return 0;
}
Which calls the EraseVehicle function you see in the command which looks like this:

pawn Код:
EraseVehicle(vehicleid)
{
  for(new players=0;players<=MAX_PLAYERS;players++)
  {
    new Float:X,Float:Y,Float:Z;
    if (IsPlayerInVehicle(players,vehicleid))
    {
      GetPlayerPos(players,X,Y,Z);
      SetPlayerPos(players,X,Y,Z+2);
      SetVehicleToRespawn(vehicleid);
    }
    SetVehicleParamsForPlayerEx(vehicleid,players,0,1);
  }
  SetTimerEx("VehRes",3000,0,"d",vehicleid);
  return 1;
}
Which sets the timer on "VehRes" function which looks like this:

pawn Код:
forward VehRes(vehicleid);
public VehRes(vehicleid)
{
  DestroyVehicle(vehicleid);
}
.. this is used in other places in the GM too.

As you can see the SetVehicleParamsForPlayerEx by kc is in there, do you think this could be causing a problem?

Help is appreciated.

Reply


Messages In This Thread
DestroyVehicle - by ded - 14.09.2009, 05:41
Re: DestroyVehicle - by ded - 14.09.2009, 21:18
Re: DestroyVehicle - by JaTochNietDan - 14.09.2009, 21:32
Re: DestroyVehicle - by shady91 - 14.09.2009, 21:39
Re: DestroyVehicle - by Jay_ - 14.09.2009, 22:43
Re: DestroyVehicle - by ded - 14.09.2009, 23:39
Re: DestroyVehicle - by dugi - 15.09.2009, 08:32
Re: DestroyVehicle - by ded - 15.09.2009, 08:51
Re: DestroyVehicle - by Betamaster - 15.09.2009, 12:02
Re: DestroyVehicle - by ded - 15.09.2009, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)