[HELP] fsdebug fs vehicle spawn bug , +rep
#1

-Moved to another thread-
Reply
#2

Show Ur Code
Reply
#3

nevermind i got it
Reply
#4

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(...)
}
}
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)