help me with vehicle!
#1

when i /q the player can't see my vehicle why?
how i can change it? + rep who help me!
Reply
#2

With /q you get out from the server...
Reply
#3

use /dl to se your vehicle info
Reply
#4

i mean in anthoer server when any player leave from the server the vehicle is stay
in my server when i /q the vehicle will gone i want when i /q the players can see my vehicle
Reply
#5

Look under OnPlayerDisconnect, as that is what happens when you /q maybe it removes the vehicle there.
Reply
#6

Post us your OnPlayerDisconnect and we will tell you what to edit.
Reply
#7

Remove the code for Destroy player car under OnPlayerDisconnect, Show the whole OnPlayerDisconnect fuction here sow e can help you with that. It will be easier for all of use.
Reply
#8

Код:
public OnPlayerDisconnect(playerid, reason)
{
	if(IsPlayerNPC(playerid)) {
		return 0;
	}
	paintballOnPlayerDisconnect(playerid, reason);
	vehOnPlayerDisconnect(playerid, reason);
	accountOnPlayerDisconnect(playerid, reason);
	RPOnPlayerDisconnect(playerid, reason);
	jobsOnPlayerDisconnect(playerid, reason);
	trainingOnPlayerDisconnect(playerid, reason);
	boxingOnPlayerDisconnect(playerid, reason);
	govOnPlayerDisconnect(playerid, reason);
	loggingOnPlayerDisconnect(playerid, reason);
	acOnPlayerDisconnect(playerid, reason);
	adminOnPlayerDisconnect(playerid, reason);
	medicOnPlayerDisconnect(playerid, reason);
	racingOnPlayerDisconnect(playerid, reason);
	//deleteRadioURLPVars(playerid);
	payphonesOnPayPhoneDisconnect(playerid, reason);
	//damageSystemOnPlayerDisconnect(playerid, reason);
	//weatherOnPlayerDisconnect(playerid, reason);
	//evidenceOnPlayerDisconnect(playerid);
	TextDrawOnPlayerDisconnect(playerid, reason);
	specialItemsOnPlayerDisconnect(playerid, reason);
	hungerOnPlayerDisconnect(playerid, reason);
	fishingOnPlayerDisconnect(playerid, reason);
	//voteKickOnPlayerDisconnect(playerid, reason);
	//SpeedTrapsOnPlayerDisconnect(playerid, reason);
	fpsCamOnPlayerDisconnect(playerid, reason);
	SQLQueriesOnPlayerDisconnect(playerid, reason);
	basketballOnPlayerDisconnect(playerid, reason);
	cheatsOnPlayerDisconnect(playerid, reason);
	eventOnPlayerDisconnect(playerid, reason);
	return 1;
}
Reply
#9

Quote:

vehOnPlayerDisconnect(playerid, reason);

Look under this function . There you'll find your thing
Reply
#10

Fred!!! Why you do this! Yeah, that's what I wanted to say too, it's under the function vehOnPlayerDisconnect(playerid, reason);

If I'm correct it's defined in vehicle.pwn as those lines:
Код:
	for(new i=0;i<sizeof(VehicleInfo);i++) {
		if(VehicleInfo[i][EVOwner] == playerid && VehicleInfo[i][EVType] == EVehicleType_Owned) {
			saveVehicle(i);
			VehicleInfo[i][EVType] = EVehicleType_Uninit;
			clearTrunk(i);
			DestroyVehicleToys(i, 0);
			DestroyVehicle(i);
		}
	}
Removing DestroyVehicle line should help.

Код:
	for(new i=0;i<sizeof(VehicleInfo);i++) {
		if(VehicleInfo[i][EVOwner] == playerid && VehicleInfo[i][EVType] == EVehicleType_Owned) {
			saveVehicle(i);
			VehicleInfo[i][EVType] = EVehicleType_Uninit;
			clearTrunk(i);
			DestroyVehicleToys(i, 0);
			DestroyVehicle(i);
		}
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)