Raised This Month: $ Target: $400
 0% 

Bomb(defuser, planter)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Waleed
Senior Member
Join Date: May 2012
Location: Pakistan
Old 06-19-2012 , 14:32   Bomb(defuser, planter)
Reply With Quote #1

PHP Code:
bomb_planting(planter)
bomb_explode planterdefuser 
What to type in "planter" or "defuser" or How to define "planter" or "defuser"?
I have searched the forums and also read "CS Bomb Scripting: http://forums.alliedmods.net/showthread.php?t=40164"
But,I couldn't find out what to type in there?

Any help would be very helpful!
Thanks,
__________________
Working On:
  1. Gameplay 1 - 0% [PAUSED]
Waleed is offline
Send a message via Skype™ to Waleed
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2012 , 14:37   Re: Bomb(defuser, planter)
Reply With Quote #2

They are forwards, so you can define whatever variable you want them to be called.

Code:
#include <amxmodx> #include <csx> public bomb_planted( iPlanter ) {     new szName[ 32 ];     get_user_name( iPlanter, szName, charsmax( szName ) );         client_print( 0, print_center, "* %s planted the bomb!", szName ); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-19-2012 , 14:39   Re: Bomb(defuser, planter)
Reply With Quote #3

Here is some of my code from a plugin i wrote.
Uses CSX's bomb_explode hook.

Code:
public bomb_explode(planter, defuser) {     if(g_bknuckles[planter] && get_pcvar_num(bombFrag_pcvar) == 1)         giveFrags(planter, 1, "BOMB_EXPLODE") }

Its quite similar to bomb_planting
The parameters are the IDs of the players, as described.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-19-2012 , 14:40   Re: Bomb(defuser, planter)
Reply With Quote #4

Quote:
Originally Posted by Exolent[jNr] View Post
They are forwards, so you can define whatever variable you want them to be called.

Code:
#include <amxmodx> #include <csx> public bomb_planted( iPlanter ) {     new szName[ 32 ];     get_user_name( iPlanter, szName, charsmax( szName ) );         client_print( 0, print_center, "* %s planted the bomb!", szName ); }
Why they are a * here ?
__________________
Pawn ? Useless
Aooka is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2012 , 14:40   Re: Bomb(defuser, planter)
Reply With Quote #5

Quote:
Originally Posted by Aooka View Post
Why they are a * here ?
Because I wanted it before the message.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-19-2012 , 14:45   Re: Bomb(defuser, planter)
Reply With Quote #6

Ah okay just for fun ^^
__________________
Pawn ? Useless
Aooka is offline
Waleed
Senior Member
Join Date: May 2012
Location: Pakistan
Old 06-20-2012 , 04:56   Re: Bomb(defuser, planter)
Reply With Quote #7

Quote:
Originally Posted by Exolent[jNr] View Post
They are forwards, so you can define whatever variable you want them to be called.

Code:
#include <amxmodx> #include <csx> public bomb_planted( iPlanter ) {     new szName[ 32 ];     get_user_name( iPlanter, szName, charsmax( szName ) );         client_print( 0, print_center, "* %s planted the bomb!", szName ); }
Its not working!
__________________
Working On:
  1. Gameplay 1 - 0% [PAUSED]
Waleed is offline
Send a message via Skype™ to Waleed
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 06-20-2012 , 05:04   Re: Bomb(defuser, planter)
Reply With Quote #8

Hm ?

PHP Code:
#include <amxmodx>

public bomb_defused(defuser) {
    new 
defuser_name[32]
    
get_user_name(defuserdefuser_namecharsmax(defuser_name))

    
client_print(0print_center"%s defused the bomb!"defuser_name)
}

public 
bomb_planted() {
    for (new 
1<= 33i++)
        if(
is_user_connected(i))
            
client_print(0print_chat"C4 has been planted!")

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-20-2012 , 06:38   Re: Bomb(defuser, planter)
Reply With Quote #9

why they are a a loop "for" ? I do not understand ...
Thanks
__________________
Pawn ? Useless
Aooka is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 06-20-2012 , 07:18   Re: Bomb(defuser, planter)
Reply With Quote #10

Quote:
Originally Posted by OnePL View Post
Hm ?

PHP Code:
#include <amxmodx>

public bomb_defused(defuser) {
    new 
defuser_name[32]
    
get_user_name(defuserdefuser_namecharsmax(defuser_name))

    
client_print(0print_center"%s defused the bomb!"defuser_name)
}

public 
bomb_planted() {
    for (new 
1<= 33i++)
        if(
is_user_connected(i))
            
client_print(0print_chat"C4 has been planted!")

What your doing makes no sense at all , your looping through all the players ... and your not even using it , exolents method should work fine
EpicMonkey is offline
Reply


Thread Tools
Display Modes

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 06:09.


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