"Variable" problem?
#1

Hello,

On my server when a player join any mini-game with cars or just spawn a vehicle, I use this variable:

Код:
DestroyVehicle(PlayerVehicle[playerid]);
PlayerVehicle[playerid] = CreateVehicle(.......
It works fine.. But it's buggy after 10/15mn of gameplay since the server is On. It seems that PlayerVehicle[MAX_PLAYERS]; become PlayerVehicle;

When a player spawn a vehicle, it destroy the vehicles of the others players :/

Any idea ?
Reply
#2

Make sure you Destroy the vehicle when a player disconnects
Reply
#3

We was only two on the server, testing, so the problem can't be from there.
The vehicle is detroyed when players leaves, exit a minigame or spawn another one.

But it seems the problem is present on all server player variables :/
Reply
#4

change it to
pawn Код:
new PlayerVehicle[MAX_VEHICLES];
and it will go much better
as players max out at 500 and vehicles may go up to 2000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)