Raised This Month: $51 Target: $400
 12% 

Bomb drop and pick up


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
L i F e
Junior Member
Join Date: May 2014
Old 05-10-2014 , 09:58   Bomb drop and pick up
Reply With Quote #1

i want a plugin.
1.when a player drop bomb he will loss money
2.when a player pick the bomb he will get a money
L i F e is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 05-10-2014 , 17:12   Re: Bomb drop and pick up
Reply With Quote #2

How much amount of money. You need to give more information.
Torge is offline
Spawner30
BANNED
Join Date: Dec 2013
Location: I Don't Know Yet
Old 05-10-2014 , 17:22   Re: Bomb drop and pick up
Reply With Quote #3

Quote:
Originally Posted by Torge View Post
How much amount of money. You need to give more information.
Make cvar !
Spawner30 is offline
Send a message via Skype™ to Spawner30
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-10-2014 , 17:47   Re: Bomb drop and pick up
Reply With Quote #4

This?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

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

new CvarMoneyPickUpCvarMoneyDrop

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
CvarMoneyDrop register_cvar("bomb_drop_money_lost""1000")
    
CvarMoneyPickUp register_cvar("bomb_get_money_win""1000")
    
register_logevent("GetThatBombMaan"3"2=Got_The_Bomb")
    
register_logevent("DropThatBombMaan"3"2=Dropped_The_Bomb")
}

public 
GetThatBombMaan()
{
    new 
id get_loguser_index()
    if(
is_user_connected(id) && is_user_alive(id) && !is_user_bot(id))
               
cs_set_user_money(idcs_get_user_money(id) + get_pcvar_num(CvarMoneyPickUp))
}

public 
DropThatBombMaan()
{
    new 
id get_loguser_index()
    if(
is_user_connected(id) && is_user_alive(id) && !is_user_bot(id))
             
cs_set_user_money(idcs_get_user_money(id) - get_pcvar_num(CvarMoneyDrop))
}

stock get_loguser_index() {
    new 
loguser[80], name[32]
    
read_logargv(0loguser79)
    
parse_loguser(logusername31)
 
    return 
get_user_index(name)

This is actually a holly simple code, so there could be any omissions, but I don't think there is something else to do.
__________________

Last edited by Flick3rR; 05-10-2014 at 17:51.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Spawner30
BANNED
Join Date: Dec 2013
Location: I Don't Know Yet
Old 05-10-2014 , 18:00   Re: Bomb drop and pick up
Reply With Quote #5

OMG so fast !
i think this is the right code !
Spawner30 is offline
Send a message via Skype™ to Spawner30
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-11-2014 , 04:46   Re: Bomb drop and pick up
Reply With Quote #6

Quote:
Originally Posted by Flick3rR View Post
but I don't think there is something else to do.
I do.
PHP Code:
if(is_user_connected(id) && is_user_alive(id) && !is_user_bot(id)) 
->
PHP Code:
if(is_user_alive(id) && !is_user_bot(id)) 
There is no need to check if he is connected and alive, since being alive requires being connected.
__________________
Kia is offline
L i F e
Junior Member
Join Date: May 2014
Old 05-11-2014 , 05:11   Re: Bomb drop and pick up
Reply With Quote #7

ty.....!!!!!!!!!
L i F e is offline
L i F e
Junior Member
Join Date: May 2014
Old 05-11-2014 , 06:12   Re: Bomb drop and pick up
Reply With Quote #8

csn any one make this for xp plugin
1.when a player drop bomb he will loss 3 xp
2.when a player pick the bomb he will get a 5 xp
L i F e is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-11-2014 , 06:36   Re: Bomb drop and pick up
Reply With Quote #9

Quote:
Originally Posted by L i F e View Post
csn any one make this for xp plugin
1.when a player drop bomb he will loss 3 xp
2.when a player pick the bomb he will get a 5 xp
Players could abuse that and get infinite XP.
__________________
Kia is offline
L i F e
Junior Member
Join Date: May 2014
Old 05-11-2014 , 07:24   Re: Bomb drop and pick up
Reply With Quote #10

Can u give me a code plz i want that
L i F e 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:32.


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