[HELP] Spawn vehicle deletes old vehicle but deletes also all other players v's - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Spawn vehicle deletes old vehicle but deletes also all other players v's (
/showthread.php?tid=156247)
[HELP] Spawn vehicle deletes old vehicle but deletes also all other players v's -
WThieves - 21.06.2010
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;
}
Re: [HELP] Spawn vehicle deletes old vehicle but deletes also all other players v's -
MadeMan - 21.06.2010
Why using a vehicle streamer if vehicles are streamed in SA-MP 0.3 ?
Re: [HELP] Spawn vehicle deletes old vehicle but deletes also all other players v's -
WThieves - 21.06.2010
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
Re: [HELP] Spawn vehicle deletes old vehicle but deletes also all other players v's -
MadeMan - 21.06.2010
Well the problem seems to be in your vehicle streamer so you have to show DestroyStreamVehicle function.
Re: [HELP] Spawn vehicle deletes old vehicle but deletes also all other players v's -
WThieves - 21.06.2010
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;
}