Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdkhooks>
- #include <sdktools>
- #include <cstrike>
- #include <codmod>
- new const String:nazwa[] = "Rusher";
- new const String:opis[] = "Jest szybki + 1/8 na insta kill z novy";
- new const String:bronie[] = "#weapon_nova#weapon_glock";
- new const inteligencja = 10;
- new const zdrowie = 10;
- new const obrazenia = 0;
- new const wytrzymalosc = 0;
- new const kondycja = 60;
- bool ma_klase[MAXPLAYERS + 1];
- public OnPluginStart()
- {
- CreateConVar(nazwa, "1.0", "Linux`");
- CreateTimer(1.6, zaladuj);
- }
- public Action zaladuj(Handle timer)
- {
- cod_register_class(nazwa, opis, bronie, inteligencja, zdrowie, obrazenia, wytrzymalosc, kondycja);
- }
- public OnClientPutInServer(client)
- {
- SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
- }
- public OnClientDisconnect(client)
- {
- SDKUnhook(client, SDKHook_OnTakeDamage, OnTakeDamage);
- }
- public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
- {
- if(!IsValidClient(victim) || !IsValidClient(attacker))
- return Plugin_Continue;
- if(!ma_klase[attacker] || GetClientTeam(victim) == GetClientTeam(attacker))
- return Plugin_Continue;
- //if(cod_get_user_item(victim) == cod_get_itemid("Betonowe Ciało"))
- //return Plugin_Continue;
- //if(cod_get_user_item(victim) == cod_get_itemid("Betonowa Głowa"))
- //return Plugin_Continue;
- new String:weapon[32];
- GetClientWeapon(attacker, weapon, sizeof(weapon));
- if(GetRandomInt(1, 1) == 1 && StrEqual(weapon, "weapon_nova") && damagetype & DMG_BULLET)
- {
- new obrazenia_gracza = GetClientHealth(victim)+1;
- cod_inflict_damage(victim, attacker, 0, obrazenia_gracza);
- }
- return Plugin_Changed;
- }
- public cod_class_enabled(client)
- {
- ma_klase[client] = true;
- }
- public cod_class_disabled(client)
- {
- ma_klase[client] = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement