21.01.2015, 13:17
Okey i need some help i hope some one will help me.
i downloaded a server, in this server will load the owned vehicle when player connect and when player disconnect the owned vehicle will destroy to avoid lagging.
This kinda non-rp.
what i want is when i start the server, all owned vehicles be loaded.
i need to use InGameModeInit but idk how.
i have this code in "stock loadchar" < this like onplayerconnect.
What i should do to make it when InGameModeInIt the owned vehicles will be loaded.
i downloaded a server, in this server will load the owned vehicle when player connect and when player disconnect the owned vehicle will destroy to avoid lagging.
This kinda non-rp.
what i want is when i start the server, all owned vehicles be loaded.
i need to use InGameModeInit but idk how.
i have this code in "stock loadchar" < this like onplayerconnect.
pawn Код:
if(PlayerInfo[playerid][vModel])
{
PlayerInfo[playerid][pVeh] = CreateVehicle(PlayerInfo[playerid][vModel], PlayerInfo[playerid][vX],PlayerInfo[playerid][vY],PlayerInfo[playerid][vZ],PlayerInfo[playerid][vA],PlayerInfo[playerid][vC1],PlayerInfo[playerid][vC2],32000);
ChangeVehiclePaintjob(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vPJ]);
if(PlayerInfo[playerid][vLocked]) SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0, 0, 0, 1, 0, 0, 0);
SetVehicleNumberPlate(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][pVehPlate]);
for(new i=0; i<14; i++)
{
AddVehicleComponent(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][pVehMod][i]);
}
}