Created
May 2, 2020 09:34
-
-
Save AmyrAhmady/42022cf4b182f2223484653fa2054839 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPT_API(SendPlayerGameInitData, | |
bool(std::shared_ptr<PlayerScriptingData> player, bool zoneNames, bool playerPedAnims, bool interiorWeapons, | |
bool limitGlobalChatRadius, float globalChatRadius, bool stuntBonus, | |
float nameTagDrawDistance, bool disableInteriorEnterExits, bool disableNameTagLOS, | |
bool manualVehicleEngineAndLights, uint32_t spawnInfoCount, bool showNameTags, | |
bool showPlayerMarkers, uint8_t worldTime, uint8_t weather, float gravity, | |
bool lanMode, uint32_t deathDropAmount, bool instagib, uint32_t onFootRate, | |
uint32_t inCarRate, uint32_t weaponRate, uint32_t multiplier, uint32_t lagCompensation, | |
std::string const & serverName, bool vehicleFriendlyFire)) | |
{ | |
GameRPC::PlayerConnect | |
pkt; | |
pkt.EnableZoneNames = zoneNames; | |
pkt.UsePlayerPedAnims = playerPedAnims; | |
pkt.AllowInteriorWeapons = interiorWeapons; | |
pkt.UseLimitGlobalChatRadius = limitGlobalChatRadius; | |
pkt.LimitGlobalChatRadius = globalChatRadius; | |
pkt.EnableStuntBonus = stuntBonus; | |
pkt.SetNameTagDrawDistance = nameTagDrawDistance; | |
pkt.DisableInteriorEnterExits = disableInteriorEnterExits; | |
pkt.DisableNameTagLOS = disableNameTagLOS; | |
pkt.ManualVehicleEngineAndLights = manualVehicleEngineAndLights; | |
pkt.SetSpawnInfoCount = spawnInfoCount; | |
pkt.PlayerID = player->ID(); | |
pkt.ShowNameTags = showNameTags; | |
pkt.ShowPlayerMarkers = (showPlayerMarkers) ? 1 : 0; | |
pkt.SetWorldTime = worldTime; | |
pkt.SetWeather = weather; | |
pkt.SetGravity = gravity; | |
pkt.LanMode = lanMode; | |
pkt.SetDeathDropAmount = deathDropAmount; | |
pkt.Instagib = instagib; | |
pkt.OnFootRate = onFootRate; | |
pkt.InCarRate = inCarRate; | |
pkt.WeaponRate = weaponRate; | |
pkt.Multiplier = multiplier; | |
pkt.LagCompensation = (lagCompensation) ? 1 : 0; | |
pkt.ServerName = serverName; | |
pkt.VehicleModels = VehicleModule::Instance()->GetModelCounts(); | |
pkt.VehicleFriendlyFire = (vehicleFriendlyFire) ? 1 : 0; | |
pkt.SendTo(*player); | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment