Vehicle spawning -help please
#2

pawn Код:
new vehicleid2;
forward CarSpawner2(playerid,model);
public CarSpawner2(playerid,model)
{
    if(PlayerInfo[playerid][pCar2] != -1) CarDeleter2(PlayerInfo[playerid][pCar2]);
        vehicleid2 = CreateVehicle(model, VehicleX, VehicleY, VehicleZ, VehicleAngle, -1, -1, -1);
    ChangeVehicleColor(vehicleid2,0,0);
    PlayerInfo[playerid][pCar2] = vehicleid2;
}

forward CarDeleter2(vehicleid);
public CarDeleter2(vehicleid)
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        SetVehicleParamsForPlayer(vehicleid,i,0,1);
    }
    SetTimerEx("VehRes2",500,0,"i",vehicleid);
}

forward VehRes2(vehicleid);
public VehRes2(vehicleid)
{
    DestroyVehicle(vehicleid);
}

public OnVehicleSpawn(vehicleid)
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(vehicleid==PlayerInfo[i][pCar2])
        {
            CarDeleter2(vehicleid);
            PlayerInfo[i][pCar2]=-1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Vehicle spawning -help please - by RedFusion - 07.07.2012, 15:36
Re: Vehicle spawning -help please - by zT KiNgKoNg - 07.07.2012, 16:15
Re: Vehicle spawning -help please - by RedFusion - 07.07.2012, 17:25
Re: Vehicle spawning -help please - by RedFusion - 08.07.2012, 20:02

Forum Jump:


Users browsing this thread: 1 Guest(s)