Plugin respawn. [rezolvat!]

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
Virussikaa
Membru, skill 0
Membru, skill 0
Posts: 53
Joined: 26 Sep 2013, 19:48
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 7 times
Contact:

02 Dec 2013, 16:35

Buna ziua,

Aveti careva un plugin pentru respawn, cand omori pe cineva sa primesti 25hp, iar cand ii dai hs sa primesti 50hp. Dar sa fie bun, fara buguri.. va rog mult.
Last edited by Raul on 03 Dec 2013, 19:28, edited 1 time in total.
Reason: [rezolvat!]
Image
Rapidserver
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

02 Dec 2013, 16:42

| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event( "DeathMsg", "evDeathMsg", "a" );
}

public evDeathMsg(id)
{
	new iKiller
	new iVictim
	new iHeadshot
	
	iKiller = read_data(1)
	iVictim = read_data(2)
	iHeadshot = read_data(3)
	
	if(iKiller != iVictim && is_user_alive(iKiller)) {
		set_user_health(iKiller, get_user_health(iKiller) + 25)
	}
	if(iHeadshot)
	{
		set_user_health(iKiller, get_user_health(iKiller) + 50)
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
User avatar
KrAiD.
Fost moderator
Fost moderator
Posts: 866
Joined: 15 Jun 2013, 11:14
Detinator Steam: Da
CS Status: Cat de cat activ :D
Detinator server CS: Nu
Reputatie: Fost Moderator ajutator
0.7 / 3
Has thanked: 14 times
Been thanked: 131 times
Contact:

02 Dec 2013, 18:17

poftim cu cvar mai bun :D
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

new const PLUGIN[]  = "Kill Bonus HP"
new const VERSION[] = "1.0"
new const AUTHOR[]  = "Adogen"

new award_hp, award_hp2, hp_MsgSync

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)   
   register_event("DeathMsg" , "event_DeathMsg" , "a" ,  "1>0" , "2>0");
   register_cvar("hp_award","1")   
   register_cvar("hp_award_hp","50")   // head kill
   register_cvar("hp_award_hp2","25")   // body kill
   register_cvar("hp_award_show","1")   
   hp_MsgSync = CreateHudSyncObj()
}

public event_DeathMsg()
{
    new killer = read_data(1)

    new clip, ammo, weapon = get_user_weapon(killer,clip,ammo)

    if(weapon == CSW_KNIFE)
    {
        new killerhealth
        killerhealth = get_user_health(killer)

        if((killerhealth + 50) > 100)
        {
            set_user_health(killer, 100)
        }
        else
        {
            set_user_health(killer, killerhealth + 50)
        }
    }
   if(!get_cvar_num("hp_award"))
      return PLUGIN_HANDLED   
      
   new id = read_data(1)
   new bool:killhead = bool:read_data(3)
   new player_hp = get_user_health(id)
   
   award_hp = get_cvar_num("hp_award_hp")
   award_hp2 = get_cvar_num("hp_award_hp2")      
   
   if((killhead) && (award_hp>0) && (is_user_alive(id)))   // head kill
   {
      if((player_hp + award_hp) > 100)
         set_user_health(id , 100)
      else
         set_user_health(id , player_hp+award_hp)

      if(get_cvar_num("hp_award_show"))
      {
         set_hudmessage(0, 255, 0, 0.01, 0.90, 0, 0.2, 0.2, 0.025, 0.02, -1)
         ShowSyncHudMsg(id, hp_MsgSync, "+%i^n", award_hp)
      }
   }

   if((!killhead) && (award_hp2>0) && (is_user_alive(id)))// body kill
   {
      if((player_hp + award_hp2) > 100)
         set_user_health(id , 100)
      else
         set_user_health(id , player_hp + award_hp2)

      if(get_cvar_num("hp_award_show"))
      {
         set_hudmessage(0, 255, 0, 0.01, 0.90, 0, 0.2, 0.2, 0.025, 0.02, -1)
         ShowSyncHudMsg(id, hp_MsgSync, "+%i^n", award_hp2)
      }
   }
   
   return PLUGIN_CONTINUE   
}
Cvar-uri
hp_award_hp 50 - hp pe headshot
hp_award_hp 25 - hp pe kill
User avatar
Virussikaa
Membru, skill 0
Membru, skill 0
Posts: 53
Joined: 26 Sep 2013, 19:48
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 7 times
Contact:

02 Dec 2013, 21:26

Multumesc KrAiD. Merge frumos, poti sa imi spui cum sa fac sa creasca viata pana la 1000 ?:-? ca, creste doar pana la 100.. apoi oricate fraguri faci nu creste peste.
Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests