[HELP] Spawn vehicle deletes old vehicle but deletes also all other players v's
#1

As the title said, it will delete all others players spawned cars so only on can drive a spawned car but i want it so that everyone can drive its owned spawned car.
pawn Code:
if (strcmp(cmd, "/spawncar", true) ==0 )
    {
        DestroyStreamVehicle(aaa[playerid]);
        GetPlayerPos(playerid,Pos[playerid][1],Pos[playerid][2],Pos[playerid][3]);
        aaa[playerid]=CreateStreamVehicle(496,Pos[playerid][1],Pos[playerid][2],Pos[playerid][3],0,-1,-1,-1);
        PutPlayerInStreamVehicle(playerid,aaa[playerid], 0);
        colori = PlayerInfo[playerid][pCol1];
        colorii = PlayerInfo[playerid][pCol2];
        new car = GetPlayerStreamVehicleID(playerid);
        ChangeStreamVehicleColor(car, colori, colorii);// HIER MOET JE ZIJN !!!
        return 1;
        }
Reply
#2

Why using a vehicle streamer if vehicles are streamed in SA-MP 0.3 ?
Reply
#3

Quote:
Originally Posted by MadeMan
Why using a vehicle streamer if vehicles are streamed in SA-MP 0.3 ?
They aren't believe me
because i couldn't make anymore cars unless i had a veh streamer
Reply
#4

Well the problem seems to be in your vehicle streamer so you have to show DestroyStreamVehicle function.
Reply
#5

Quote:
Originally Posted by MadeMan
Well the problem seems to be in your vehicle streamer so you have to show DestroyStreamVehicle function.
I don't get it, what does that destroyveh function has to do whit it? here it is
pawn Code:
forward DestroyStreamVehicle(svehicleid);
public DestroyStreamVehicle(svehicleid)
{
    if(svehicleid>=0 && svehicleid<MAX_STREAM_VEHICLES)
    {
      if(VehicleInfo[svehicleid][CREATED])
      {
        if(VehicleInfo[svehicleid][VEHICLE_ID])
        {
          DestroyVehicle(VehicleInfo[svehicleid][VEHICLE_ID]);
          VehicleCount--;
            }
        VehicleInfo[svehicleid][CREATED]=false;
        return 1;
      }
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)