SA-MP Forums Archive
[HELP] fsdebug fs vehicle spawn bug , +rep - 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)
+--- Thread: [HELP] fsdebug fs vehicle spawn bug , +rep (/showthread.php?tid=545184)



-Moved- - ItzRbj - 06.11.2014

-Moved to another thread-


Re: [HELP] fsdebug fs vehicle spawn bug , +rep - UltraScripter - 06.11.2014

Show Ur Code


Re: [HELP] fsdebug fs vehicle spawn bug , +rep - UltraScripter - 06.11.2014

nevermind i got it


Re: [HELP] fsdebug fs vehicle spawn bug , +rep - CNMike - 06.11.2014

Create a variable for each player

Код:
new LastCreatedVeh[MAX_PLAYERS];
Set it everytime they spawn a car as the car they create!

for example

Код:
LastCreatedVeh[playerid] = CreateVehicle(...)
that will set the id of vehicle to the varible.

then create an if statement above that saying if they already have a vehicle destroy it..

Код:
if(LastCreatedVeh[playerid] != 0) {
DestroyVehicle(LastCreatedVeh[playerid]);
LastCreatedVeh[playerid]=0;
}
if(LastCreatedVeh[playerid] == 0) {
LastCreatedVeh[playerid] = CreateVehicle(...)
}
}



Re: [HELP] fsdebug fs vehicle spawn bug , +rep - ItzRbj - 06.11.2014

Quote:
Originally Posted by CNMike
Посмотреть сообщение
Create a variable for each player

Код:
new LastCreatedVeh[MAX_PLAYERS];
Set it everytime they spawn a car as the car they create!

for example

Код:
LastCreatedVeh[playerid] = CreateVehicle(...)
that will set the id of vehicle to the varible.

then create an if statement above that saying if they already have a vehicle destroy it..

Код:
if(LastCreatedVeh[playerid] != 0) {
DestroyVehicle(LastCreatedVeh[playerid]);
LastCreatedVeh[playerid]=0;
}
if(LastCreatedVeh[playerid] == 0) {
LastCreatedVeh[playerid] = CreateVehicle(...)
}
}

thats what i got when i added ur lines

Код:
C:\Users\Mohamed\Desktop\home8\samp\clients\port_8009\filterscripts\fsdebug.pwn(905) : warning 209: function "dcmd_v" should return a value
C:\Users\Mohamed\Desktop\home8\samp\clients\port_8009\filterscripts\fsdebug.pwn(908) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.