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

Money All-in-One (update 3.3)


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2008 , 20:21   Re: Money All-in-One
Reply With Quote #11

Try to do something :

#define MAX_CLIENTS 32

new g_client_connected[ MAX_CLIENTS + 1 ];
new new g_tag[ MAX_CLIENTS + 1 ];


More neat I think.
__________________
Arkshine is offline
[email protected]
Member
Join Date: Oct 2008
Location: China,Shanghai
Old 11-17-2008 , 20:33   Re: Money All-in-One
Reply With Quote #12

Quote:
Originally Posted by connorr View Post
Dynamic natives would be better.

Thank you. I'd appreciate your suggestion.

I'm a beginner, I don't know how to do that.

I realy need a good advisor, would you like to teach me?
tomcash@263.net is offline
Send a message via MSN to tomcash@263.net
[email protected]
Member
Join Date: Oct 2008
Location: China,Shanghai
Old 11-17-2008 , 20:39   Re: Money All-in-One
Reply With Quote #13

Quote:
Originally Posted by arkshine View Post
French translation :

Code:
[fr]
HEAD_SHOT = %s a tue un ennemi avec un tir en plein tete ! Il gagne %s$ en bonus !
GRENADE_KILL = %s a tue un ennemi avec une grenade ! Il gagne %s$ en bonus !
KNIFE_KILL = %s aime le couteau ! Il gagne %s$ en bonus !
RUSH_KILL= %s est No.%d des tueurs dans ce round ! Il gagne %s$ en bonus !
BOMB_PLANTED= %s a plante la bombe ! Il gagne %s$ en bonus !
BOMB_EXPLODE= Bombe explosee ! %s gagne %s$ en bonus !
BOMB_DEFUSED= %s a desamorce la bombe dans le feu de l'action ! Il gagne %s$ en bonus !
CMD_NO_TARGET= Desole, le joueur %s n'a pas ete trouve !
MENU_NAME = Donner de l'argent a des joueurs
MENU_AMOUNT= Quantite
MENU_MORE= Plus...
MENU_BACK= Retour
MENU_EXIT= Quitter
ALL_CTS= [Tous les CTs]
ALL_TS= [Tous les Ts]
ALL_PLAYERS= [Tous les Joueurs]
Thank you, arkshine. I'd appreciate your work. (:
tomcash@263.net is offline
Send a message via MSN to tomcash@263.net
[email protected]
Member
Join Date: Oct 2008
Location: China,Shanghai
Old 11-17-2008 , 20:45   Re: Money All-in-One
Reply With Quote #14

Quote:
Originally Posted by arkshine View Post
Try to do something :

#define MAX_CLIENTS 32

new g_client_connected[ MAX_CLIENTS + 1 ];
new new g_tag[ MAX_CLIENTS + 1 ];

More neat I think.

It is a better way! Thank you (:

BTW, why you new twice?
tomcash@263.net is offline
Send a message via MSN to tomcash@263.net
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2008 , 20:48   Re: Money All-in-One
Reply With Quote #15

Oops. But you get the idea. ^^
__________________
Arkshine is offline
[email protected]
Member
Join Date: Oct 2008
Location: China,Shanghai
Old 11-17-2008 , 20:52   Re: Money All-in-One
Reply With Quote #16

Quote:
Originally Posted by benamo6 View Post
Ill make you ES version:

[es]
HEAD_SHOT = %s metio un Head Shot! El obtiene %s$
GRENADE_KILL = %s mato a un enemigo con una HE! El obtiene %s$
KNIFE_KILL = %s metio un fakaso! El obtiene %s$
RUSH_KILL= %s la rushio.%d asesino en esta ronda! El obtiene %s$
BOMB_PLANTED= %s planto la bomba! El obtiene %s$
BOMB_EXPLODE= Exploto la bomba! El que la planto: %s obtiene %s$
BOMB_DEFUSED= %s Defuseo la bomba! El obtiene %s$
CMD_NO_TARGET= El jugador %s no pudo ser encontrado.
MENU_NAME = Dio dinero a los jugadores.
MENU_AMOUNT= Cantidad
MENU_MORE= Mas...
MENU_BACK= Atras
MENU_EXIT= Exit
ALL_CTS= [All CTs]
ALL_TS= [All TTs]
ALL_PLAYERS= [Todos los jugadores]

+k please

Thank you, benamo6 ! You are so nice. +k
tomcash@263.net is offline
Send a message via MSN to tomcash@263.net
[email protected]
Member
Join Date: Oct 2008
Location: China,Shanghai
Old 11-17-2008 , 20:55   Re: Money All-in-One
Reply With Quote #17

Quote:
Originally Posted by arkshine View Post
Oops. But you get the idea. ^^

Yes, I'v got it.
tomcash@263.net is offline
Send a message via MSN to tomcash@263.net
Spunky
Senior Member
Join Date: May 2008
Location: Orlando, Fl.
Old 11-17-2008 , 21:04   Re: Money All-in-One
Reply With Quote #18

Quote:
Originally Posted by [email protected] View Post
Yes, this plugin for Counter-Strike 1.6 mod only, I'v not tested it for another. (:

I write 32 + 1 to prevent mistake of out boundary error. I think it is a good habit to define a array like that. (:
You don't get out of boundary errors if you know how big the array is and know how to count.

Array example:
PHP Code:
new g_Array[32]

g_Array[0]
...
g_Array[31
0 to 31, perfectly good variables.
Spunky is offline
Send a message via AIM to Spunky
[email protected]
Member
Join Date: Oct 2008
Location: China,Shanghai
Old 11-17-2008 , 21:17   Re: Money All-in-One
Reply With Quote #19

Quote:
Originally Posted by Spunky View Post
You don't get out of boundary errors if you know how big the array is and know how to count.

Array example:
PHP Code:
new g_Array[32]
 
g_Array[0]
...
g_Array[31
0 to 31, perfectly good variables.

I think arkshine's way is better and more safe. Howere, thank you.
tomcash@263.net is offline
Send a message via MSN to tomcash@263.net
Spunky
Senior Member
Join Date: May 2008
Location: Orlando, Fl.
Old 11-17-2008 , 22:07   Re: Money All-in-One
Reply With Quote #20

Yeah but that's unnecessary memory allocation. You're setting aside memory that's never going to be used because the maximum number of players in any Half-Life modification is 32. A small amount of memory, sure, but a waste nonetheless.

Do what you want though, it's your plugin.
Spunky is offline
Send a message via AIM to Spunky
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 15:48.


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