Raised This Month: $32 Target: $400
 8% 

Lives 1.9


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
LordOfNothing
BANNED
Join Date: Jul 2013
Old 10-28-2013 , 03:55   Lives 1.9
Reply With Quote #1





  • Description:

- So this plugin allow players respawn using a life , for hooking a life you need to kill a player.
- I hope this plugin will be used in many servers and apreciate .
- If u having bugs or sugestion to say please comment ,thanks .


  • Public Commands:

/respawn
/autorespawn
/buylife
/lives


  • Admin Command:

amx_lives


  • Cvars:

mp_enable_lives 1/0
mp_default_lives 0
mp_lives_buylife 1/0
mp_lives_money 10000
mp_lives_save 1/0

  • Natives(lives.inc):


Code:
/*
  TYPE : Native
  DESCRIPTION : return lives value !
*/
 
native get_lives(plugin, param);
 
/*
   TYPE: Native
   DESCRIPTION : set lives value to a player !
*/
 
native set_lives(plugin, param);



ChangeLog :
Spoiler


Credits :
Spoiler
Attached Files
File Type: sma Get Plugin or Get Source (lives.sma - 730 views - 7.1 KB)

Last edited by LordOfNothing; 11-22-2013 at 01:56.
LordOfNothing is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-28-2013 , 03:59   Re: [0.0.1] Lifes [2013]
Reply With Quote #2

Your is_user_vip stock is pointless
In C_Kill, you are printing the message even if you do not give the attacker a life
Is the auto_exec_config thing really needed?
Fix your indentation
You are including a file that is never used, plus you didn't provide the location to obtain such file
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Old 10-28-2013, 04:05
LordOfNothing
This message has been deleted by LordOfNothing. Reason: lol , now i understand , sorry :))
LordOfNothing
BANNED
Join Date: Jul 2013
Old 10-28-2013 , 04:06   Re: [0.0.1] Lifes [2013]
Reply With Quote #3

UPDATE 0.0.2 :

Check frist post !
LordOfNothing is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-28-2013 , 04:17   Re: [0.0.1] Lifes [2013]
Reply With Quote #4

Quote:
Originally Posted by YamiKaitou View Post
In C_Kill, you are printing the message even if you do not give the attacker a life
Fix your indentation
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
LordOfNothing
BANNED
Join Date: Jul 2013
Old 10-28-2013 , 04:23   Re: [0.0.2] Lifes [2013]
Reply With Quote #5

ok, will be updated when im back from the school !


Q: if replaceing this code :
Code:
public C_Kill(victim, attacker)
{

	if(get_pcvar_num(g_Life) && is_user_alive(attacker))
	Lifes[attacker] = Lifes[attacker] + 1;
	client_print(attacker, print_chat,"[LIFES] You got a life !");

}
with this , will should be fine no ?

Code:
public C_Kill(victim, attacker)
{

	if(get_pcvar_num(g_Life) && is_user_alive(attacker))
	Lifes[attacker] += 1;
	client_print(attacker, print_chat,"[LIFES] You got a life !");

}

Last edited by LordOfNothing; 10-28-2013 at 04:27.
LordOfNothing is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-28-2013 , 04:47   Re: [0.0.2] Lifes [2013]
Reply With Quote #6

It does the exact same thing, nothing will be changed.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 10-28-2013 , 07:07   Re: [0.0.2] Lifes [2013]
Reply With Quote #7

PHP Code:
public C_Kill(victimattacker)
{
    if(
get_pcvar_num(g_Life) && is_user_alive(attacker))
    {
        
Lifes[attacker] += 1;
        
client_print(attackerprint_chat,"[LIFES] You got a life !");
    }

- The killer may not be a player.
- Cache the values of the cvars.
- Cache the value of "is_user_alive" ( Optional I think ).
- "get_user_frags(id) & ADMIN_IMMUNITY" ??
http://www.amxmodx.org/funcwiki.php?...lags&go=search

+ Avoid to release plugins if you're a beginner +
__________________
micapat is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-28-2013 , 13:38   Re: [0.0.2] Lifes [2013]
Reply With Quote #8

Quote:
Originally Posted by micapat View Post

+ Avoid to release plugins if you're a beginner +
I agree, if you are not even able to correctly handle a if() block, you shouldn't release plugins.



P.S. : http://www.oxforddictionaries.com/de...sh/life?q=life
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 10-28-2013 at 15:53.
ConnorMcLeod is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 10-28-2013 , 18:22   Re: [0.0.2] Lifes [2013]
Reply With Quote #9

God damn, it does not have any customization method.
Also, I have never heard of lifes. Did you ever hear about that, Connor?
I suggest changing name to lives.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
bibu
Veteran Member
Join Date: Sep 2010
Old 10-28-2013 , 19:19   Re: [0.0.2] Lifes [2013]
Reply With Quote #10

Quote:
Originally Posted by claudiuhks View Post
Also, I have never heard of lifes. Did you ever hear about that, Connor?
I suggest changing name to lives.
The name is fine.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode