Help [Script deleting cars owned cars]
#1

Hey everyone! I have a problem. When a player buy a vehicle, everything works fine, but unce he leave the server, his cars got automatically deleted by the script. Then he needs to buy them again on login. Here is what I seen in the script about that.

Код:
	}
	if(PlayerInfo[playerid][PlayerVehicleModel1] != 0)
	{
		ResetPlayerVehicle(playerid,1);
	}
	if(PlayerInfo[playerid][PlayerVehicleModel2] != 0)
	{
		ResetPlayerVehicle(playerid,2);
	}
	if(PlayerInfo[playerid][PlayerVehicleModel3] != 0)
	{
		ResetPlayerVehicle(playerid,3);
	}
	if(PlayerInfo[playerid][PlayerVehicleModel4] != 0)
	{
		ResetPlayerVehicle(playerid,4);
	}
	if(PlayerInfo[playerid][PlayerVehicleModel5] != 0)
	{
		ResetPlayerVehicle(playerid,5);
	}
    printf("//Deleting Vehicles For ID: %d", playerid);
	return 1;
}
"Deleting Vehicles for ID " is exact what is writing at the panel. Please if anyone know what is going on, help me!
Reply
#2

Log from server.

Quote:

[16:59:55] //Deleting Vehicles For ID: 0
[16:59:55] [part] KC_BIaze has left the server (0:1)
[17:05:41] --- Server Shutting Down.
[17:05:41]

Reply
#3

This is really annoying.
Reply
#4

So you don't want the vehicles to destroy when they leave? I didn't really get it.

If so, search for "DestroyVehicle" in the stock "ResetPlayerVehicle" and remove the lines with "DestroyVehicle".
Reply
#5

It's a RP server. When a player buy vehicle, it should remain always with him, untill he sells it.

But now, player buy a car, everything works fine, but once he leave the server, his car is beeing deleted from the server, and it's like he never owned one. When he login again, he needs to buy another car.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)