Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sdktools>
- #include <sourcemod>
- #include <colors>
- #define MAX_FILE_LEN 256
- public Plugin:myinfo =
- {
- name = "*~ Plugin DV ~*",
- author = "Delachambre",
- description = "Annonce la DV",
- version = "1.0",
- url = "http://vip-magnetik.fr/"
- }
- public OnPluginStart()
- {
- HookEvent("player_death", Event_PlayerDeath);
- RegConsoleCmd("sm_dv", Cmd_Dv);
- }
- public Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
- {
- new victim = GetClientOfUserId(GetEventInt(event, "userid"));
- if (GetClientTeam(victim) == 2)
- {
- decl Ts;
- for(new i=1; i < MaxClients; i++)
- {
- if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2)
- {
- Ts++;
- }
- }
- if (Ts == 1)
- {
- PrintCenterTextAll("==========> DERNIERE VOLONTEE <==========");
- {
- CPrintToChatAll("{red}======== DERNIERE VOLONTEE ========");
- CPrintToChatAll("{red}Le dernier T a accès a sa DV");
- CPrintToChatAll("{red}Il peut tapé !dv");
- CPrintToChatAll("{red}======== DERNIERE VOLONTEE ========");
- ServerCommand("sm_tsay pink => DV <=");
- }
- }
- }
- }
- public Action:Cmd_Dv(client, args)
- {
- new Ts;
- for(new i=1; i <= GetMaxClients(); i++)
- {
- if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2)
- {
- Ts++;
- }
- }
- if ((GetClientTeam(client) == 2) && (IsPlayerAlive(client)) && (IsClientInGame(client)) && (Ts == 1))
- {
- new Handle:menu = CreateMenu(dvmenu);
- SetMenuTitle(menu, "Choisis ta DV :");
- AddMenuItem(menu, "Cut", "Combat de Cut");
- AddMenuItem(menu, "Roulette", "Roulette");
- AddMenuItem(menu, "Isoloir", "Isoloire");
- AddMenuItem(menu, "Planchepirate", "Planche pirate");
- AddMenuItem(menu, "Roulettechinoise", "Roulette chinoise");
- AddMenuItem(menu, "Cutaquatique", "Cut aquatique");
- DisplayMenu(menu, client, 15);
- }
- else
- {
- CPrintToChat(client, "{green}[JailMod] : {lightgreen}Vous n'avez pas accès a cette commande.");
- }
- }
- public dvmenu(Handle:menu, MenuAction:action, client, param2)
- {
- if (action == MenuAction_Select)
- {
- new String:info[32];
- GetMenuItem(jail_menu, param2, info, sizeof(info));
- for (new i = 1; i < MaxClients; i++)
- {
- if (StrEqual(info, "Cut"))
- {
- CPrintToChatAll("{green}[Dernière volontée] : {lightgreen}Le terroriste a choisis un combat de cut.");
- PrintCenterTextAll("=====> DV : CUT <=====");
- new Float:origincut[3]
- origincut[0] = -2774.0
- origincut[1] = -1255.7
- origincut[2] = 128.0
- if ((GetClientTeam(client) == 2) && IsPlayerAlive(client))
- {
- SetEntityHealth(client, 200);
- TeleportEntity(client, origincut, NULL_VECTOR, NULL_VECTOR);
- }
- TeleportEntity(i, origincut, NULL_VECTOR, NULL_VECTOR);
- SetEntityHealth(i, 200);
- }
- if (StrEqual(info, "Roulette"))
- {
- CPrintToChatAll("{green}[Dernière volontée] : {lightgreen}Le terroriste a choisis une roulette normal.");
- PrintCenterTextAll("=====> DV : ROULETTE <=====");
- new Float:originrou[3]
- originrou[0] = -337.7
- originrou[1] = 195.5
- originrou[2] = 128.0
- if ((GetClientTeam(client) == 2) && (IsPlayerAlive(client)) && (IsClientInGame(client)))
- {
- GivePlayerItem(client, "weapon_deagle");
- SetEntityHealth(client, 100);
- TeleportEntity(client, originrou, NULL_VECTOR, NULL_VECTOR);
- }
- TeleportEntity(i, originrou, NULL_VECTOR, NULL_VECTOR);
- GivePlayerItem(i, "weapon_deagle");
- SetEntityHealth(i, 100);
- }
- if (StrEqual(info, "Isoloir"))
- {
- CPrintToChatAll("{green}[Dernière volontée] : {lightgreen}Le terroriste a choisis un isoloire.");
- PrintCenterTextAll("=====> DV : ISOLOIRE <=====");
- new Float:originiso[3]
- originiso[0] = -1429.7
- originiso[1] = -723.7
- originiso[2] = 129.0
- if ((GetClientTeam(client) == 2) && (IsPlayerAlive(client)) && (IsClientInGame(client)))
- {
- GivePlayerItem(client, "weapon_m249");
- SetEntityHealth(client, 400);
- TeleportEntity(client, originiso, NULL_VECTOR, NULL_VECTOR);
- }
- TeleportEntity(i, originiso, NULL_VECTOR, NULL_VECTOR);
- SetEntityHealth(i, 400);
- }
- if (StrEqual(info, "Planchepirate"))
- {
- CPrintToChatAll("{green}[Dernière volontée] : {lightgreen}Le terroriste a choisis une planche pirate.");
- PrintCenterTextAll("=====> DV : PLANCHE PIRATE <=====");
- new Float:origin[3]
- origin[0] = -285.8
- origin[1] = 2240.6
- origin[2] = 128.0
- if ((GetClientTeam(client) == 2) && (IsPlayerAlive(client)) && (IsClientInGame(client)))
- {
- GivePlayerItem(client, "weapon_deagle");
- SetEntityHealth(client, 100);
- TeleportEntity(client, origin, NULL_VECTOR, NULL_VECTOR);
- }
- TeleportEntity(i, origin, NULL_VECTOR, NULL_VECTOR);
- SetEntityHealth(i, 100);
- GivePlayerItem(i, "weapon_deagle");
- }
- if (StrEqual(info, "Roulettechinoise"))
- {
- CPrintToChatAll("{green}[Dernière volontée] : {lightgreen}Le terroriste a choisis une roulette chinoise.");
- PrintCenterTextAll("=====> DV : ROULETTE CHINOISE <=====");
- new Float:originchi[3]
- originchi[0] = -1193.1
- originchi[1] = 260.7
- originchi[2] = 264.0
- if ((GetClientTeam(client) == 2) && (IsPlayerAlive(client)) && (IsClientInGame(client)))
- {
- GivePlayerItem(client, "weapon_deagle");
- SetEntityHealth(client, 100);
- TeleportEntity(client, originchi, NULL_VECTOR, NULL_VECTOR);
- }
- TeleportEntity(i, originchi, NULL_VECTOR, NULL_VECTOR);
- SetEntityHealth(i, 100);
- GivePlayerItem(i, "weapon_deagle");
- }
- if (StrEqual(info, "Cutaquatique"))
- {
- CPrintToChatAll("{green}[Dernière volontée] : {lightgreen}Le terroriste a choisis un cut aquatique.");
- PrintCenterTextAll("=====> DV : CUT AQUATIQUE <=====");
- new Float:originaqua[3]
- originaqua[0] = -191.6
- originaqua[1] = 2527.0
- originaqua[2] = 274.3
- if ((GetClientTeam(client) == 2) && (IsPlayerAlive(client)) && (IsClientInGame(client)))
- {
- TeleportEntity(client, originaqua, NULL_VECTOR, NULL_VECTOR);
- }
- TeleportEntity(i, originaqua, NULL_VECTOR, NULL_VECTOR);
- }
- }
- }
- else if (action == MenuAction_End)
- {
- CloseHandle(menu);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement