AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Bomb planted? (https://forums.alliedmods.net/showthread.php?t=189929)

Santaaa 07-12-2012 15:30

Bomb planted?
 
Hey,

How would I check who planted the bomb and who defused?

Santaaa 07-12-2012 15:37

Re: Bomb planted?
 
Nvm, found.

meTaLiCroSS 07-12-2012 15:37

Re: Bomb planted?
 
Take a look at: http://forums.alliedmods.net/showthread.php?t=40164

kramesa 07-12-2012 15:47

Re: Bomb planted?
 
Look at this example:

Code:
#include <amxmodx> #include <csx> public bomb_defused(Defuser) {     new szName[32];     get_user_name(Defuser, szName, charsmax(szName));     client_print(0, print_center, "%s defused the bomb.", szName); } public bomb_planted(Planter) {     new szName[32];     get_user_name(Planter, szName, charsmax(szName));         client_print(0, print_center, "%s planted the bomb.", szName); }

hornet 07-12-2012 18:12

Re: Bomb planted?
 
Quote:

Originally Posted by kramesa (Post 1748935)
Look at this example:

Code:
#include <amxmodx> #include <csx> public bomb_defused(Defuser) {     new szName[32];     get_user_name(Defuser, szName, charsmax(szName));     client_print(0, "%s defused the bomb.", szName); } public bomb_planted(Planter) {     new szName[32];     get_user_name(Planter, szName, charsmax(szName));         client_print(0, "%s planted the bomb.", szName); }

Your example would error. Also the thread starter did state that he already found the solution.

Santaaa 07-13-2012 04:24

Re: Bomb planted?
 
^^

Irena 07-13-2012 06:00

Re: Bomb planted?
 
Quote:

Originally Posted by kramesa (Post 1748935)
Look at this example:

Code:
#include <amxmodx> #include <csx> public bomb_defused(Defuser) {     new szName[32];     get_user_name(Defuser, szName, charsmax(szName));     client_print(0, "%s defused the bomb.", szName); } public bomb_planted(Planter) {     new szName[32];     get_user_name(Planter, szName, charsmax(szName));         client_print(0, "%s planted the bomb.", szName); }



it worked thanks dude. i was in need for this code too but i didnt found it on internet. I am just here by chance. cool

hornet 07-13-2012 06:17

Re: Bomb planted?
 
Quote:

Originally Posted by Irena (Post 1749329)
it worked thanks dude. i was in need for this code too but i didnt found it on internet. I am just here by chance. cool

Let's assume it worked after you fixed it.

Code:

client_print(0, print_center, "%s planted the bomb.", szName);

kramesa 07-20-2012 10:04

Re: Bomb planted?
 
Wow, sorry! Thanks hornet.

Aooka 07-20-2012 13:22

Re: Bomb planted?
 
Take a look at the funcwiki krasmesa. :)
And here for the syntax of client_print : http://www.amxmodx.org/funcwiki.php?go=func&id=22

Quote:

client_print ( index, type, const message[], ... )


All times are GMT -4. The time now is 15:00.

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