Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static bool ActionService(cPlayerInfo player, cOrganisationInfo orga)
- {
- if (player.OrganisationList.Contains(orga))
- {
- player.OnDutyOrgaType3 = !player.OnDutyOrgaType3;
- if (player.OnDutyOrgaType3)
- {
- var random = new Random();
- Vector3 position = sPosition.Mineur2.Position + new Vector3(random.Next(-45, 45), random.Next(-45, 45), -75);
- //TextLabel label = mGlobal.API.createTextLabel("~g~ Appuyez sur latouche ~r~ /E ~w~ afin de commencer à miner.", position, 10f, 0.5f, false, mWorld.WorldDimension);
- PlayerListVectorMineur.Add(player, new MineurCheckpoint(null, position));
- mGlobal.API.triggerClientEvent(player.Handle, "job_create_pickup2", "Mineur", position - new Vector3(0, 0, 1.5f), 2.5f);
- mGlobal.API.sendNotificationToPlayer(player.Handle, "Vous venez correctement de vous mettre en ~y~service !~w~");
- if (player.Sexe)
- {
- if ((PedHash)player.Skin == PedHash.FreemodeFemale01)
- {
- mGlobal.API.setPlayerSkin(player.Handle, (PedHash)player.Skin);
- Task.Run(async () =>
- {
- mGlobal.API.setPlayerDefaultClothes(player.Handle);
- await dClothing.LoadPlayerBlendData(player);
- await dClothing.LoadPlayerComponent(player);
- switch (new Random().Next(1, 3)) // Random pour varier les vêtements - Draneus
- {
- case 1:
- mGlobal.API.setPlayerClothes(player.Handle, 0, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 1, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 3, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 4, 27, 8);
- mGlobal.API.setPlayerClothes(player.Handle, 5, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 6, 27, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 7, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 8, 59, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 9, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 10, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 11, 16, 0);
- break;
- case 2:
- mGlobal.API.setPlayerClothes(player.Handle, 0, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 1, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 3, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 4, 27, 3);
- mGlobal.API.setPlayerClothes(player.Handle, 5, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 6, 27, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 7, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 8, 59, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 9, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 10, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 11, 1, 0);
- break;
- case 3:
- mGlobal.API.setPlayerClothes(player.Handle, 0, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 1, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 3, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 4, 27, 2);
- mGlobal.API.setPlayerClothes(player.Handle, 5, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 6, 27, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 7, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 8, 59, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 9, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 10, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 11, 1, 0);
- break;
- }
- });
- }
- else
- {
- mGlobal.API.setPlayerSkin(player.Handle, PedHash.Cop01SFY);
- }
- }
- else if (!player.Sexe)
- {
- if ((PedHash)player.Skin == PedHash.FreemodeMale01)
- {
- mGlobal.API.setPlayerSkin(player.Handle, (PedHash)player.Skin);
- Task.Run(async () =>
- {
- mGlobal.API.setPlayerDefaultClothes(player.Handle);
- await dClothing.LoadPlayerBlendData(player);
- await dClothing.LoadPlayerComponent(player);
- switch (new Random().Next(1, 3)) // Random pour varier les vêtements - Draneus
- {
- case 1:
- mGlobal.API.setPlayerClothes(player.Handle, 0, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 1, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 3, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 4, 27, 8);
- mGlobal.API.setPlayerClothes(player.Handle, 5, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 6, 27, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 7, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 8, 59, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 9, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 10, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 11, 16, 0);
- break;
- case 2:
- mGlobal.API.setPlayerClothes(player.Handle, 0, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 1, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 3, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 4, 27, 2);
- mGlobal.API.setPlayerClothes(player.Handle, 5, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 6, 27, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 7, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 8, 59, 1);
- mGlobal.API.setPlayerClothes(player.Handle, 9, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 10, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 11, 1, 0);
- break;
- case 3:
- mGlobal.API.setPlayerClothes(player.Handle, 0, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 1, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 3, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 4, 27, 3);
- mGlobal.API.setPlayerClothes(player.Handle, 5, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 6, 27, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 7, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 8, 59, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 9, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 10, 0, 0);
- mGlobal.API.setPlayerClothes(player.Handle, 11, 1, 0);
- break;
- }
- });
- }
- else
- {
- mGlobal.API.setPlayerSkin(player.Handle, PedHash.Cop01SMY);
- }
- }
- cWeaponInfo.GiveAllPlayerWeapon(player);
- }
- else if (!player.OnDutyOrgaType3)
- {
- mGlobal.API.sendNotificationToPlayer(player.Handle, "Vous venez de ~y~sortir~w~ de votre service !");
- mGlobal.API.setPlayerSkin(player.Handle, (PedHash)player.Skin);
- dPlayer.DefinePlayerSkin(player);
- mGlobal.API.setPlayerArmor(player.Handle, 0);
- player.RemoveAllPlayerWeaponService();
- }
- return true;
- }
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement