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

Minigun


Post New Thread Reply   
 
Thread Tools Display Modes
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 06-20-2009 , 20:47   Re: Minigun
Reply With Quote #21

Spanish Translation:

Code:
[es]
MINIGUN_ADMIN_GIVE_ALL = El administrador te a dado una Minigun con %d balas!
MINIGUN_ADMIN_GIVE = Administrador dio %s %d Miniguns
MINIGUN_ADMIN_BUY = Solo los adminsitradores pueden comprar esto!
MINIGUN_ALIVE = Solo puedes comprar una Minigun estando vivo.
MINIGUN_ALREADY = Ya tienes una Minigun.
MINIGUN_NO_MONEY = No tienes dinero suficiente!!!
MINIGUN_BUY = Has comprado una Minigun por $%i.
MINIGUN_FOR_BUY = Para comprar una Minigun, escribe /minigun en el chat.
MINIGUN_PRICE = Precio Minigun- $%d
__________________
"There is no knowledge, that is not power"
fezh is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 06-20-2009 , 23:17   Re: Minigun
Reply With Quote #22

CLLlAgOB, this code needs a full re-write.

As an example, the function remowegun is like to hunt a bunny with a militar tank. You can make it as this instead:

PHP Code:
public remowegun(id
{
    
fm_strip_user_gun(id,CSW_M249)

__________________
joaquimandrade is offline
CLLlAgOB
Senior Member
Join Date: Oct 2007
Location: Russia
Old 06-21-2009 , 05:29   Re: Minigun
Reply With Quote #23

Quote:
Originally Posted by joaquimandrade View Post
CLLlAgOB, this code needs a full re-write.

As an example, the function remowegun is like to hunt a bunny with a militar tank. You can make it as this instead:

PHP Code:
public remowegun(id
{
    
fm_strip_user_gun(id,CSW_M249)

You mean what better to use the module fakemeta?
CLLlAgOB is offline
eforie
BANNED
Join Date: Dec 2008
Location: Romania
Old 06-21-2009 , 06:34   Re: Minigun
Reply With Quote #24

"You now how cuth a moment a human state zombie? "
i don`t know
eforie is offline
Send a message via Yahoo to eforie Send a message via Skype™ to eforie
CLLlAgOB
Senior Member
Join Date: Oct 2007
Location: Russia
Old 06-21-2009 , 07:06   Re: Minigun
Reply With Quote #25

Quote:
Originally Posted by joaquimandrade View Post
CLLlAgOB, this code needs a full re-write.

As an example, the function remowegun is like to hunt a bunny with a militar tank. You can make it as this instead:

PHP Code:
public remowegun(id
{
    
fm_strip_user_gun(id,CSW_M249)

Fix and use fakemeta
CLLlAgOB is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 06-21-2009 , 07:20   Re: Minigun
Reply With Quote #26

Quote:
Originally Posted by CLLlAgOB View Post
You mean what better to use the module fakemeta?
It's not about the module is about the way of doing each part of the plugin. In that function you are removing every weapon of the player and then giving him again those that are not a minigun. What you should do instead? Simply remove the minigun. Like you have it, not only it doesn't lots of unneeded things, as it doesn't care about the weapons' ammo.

Another example:

You are using event_start_freezetime to check if a player that survived the round has a minigun and to show a message to every player. Instead hook Ham_Spawn pre and check if the player is alive. And hook Ham_Spawn post and show him the message. This way you won't miss players that spawned after freeze time, you will not make checks for player that didn't survived the round and, you increase the cross-mod compatible code, since the HLTV event is CS specific.

I also doubt that you need this hook: fwEvGameWillRestartIn

You are not using pfn_touch

You have g_MaxPlayers but you don't use it always you can and when you use it you use it wrong:

Code:
for(id = 1; id < g_MaxPlayers; id++) {
(Should be <= )

get_user_msgid("StatusText") should be cached.

You code style varies from function to function, what shows that it is composed of several pieces glued together instead of you making it your style and your way.
__________________

Last edited by joaquimandrade; 06-21-2009 at 07:25.
joaquimandrade is offline
merkava
Junior Member
Join Date: Jun 2008
Old 06-21-2009 , 08:24   Re: Minigun
Reply With Quote #27

Polish translate.

Code:
[pl]
MINIGUN_ADMIN_GIVE_ALL = Admin dal Ci obrotowke z %d nabojami!
MINIGUN_ADMIN_GIVE = Admin dal %s %d obrotowke.
MINIGUN_ADMIN_BUY = Tylko admin moze kupic ta bron!
MINIGUN_ALIVE = Mozesz kupic ta bron jesli jestes zywy.
MINIGUN_ALREADY = Masz obrotowke!
MINIGUN_NO_MONEY = Masz za malo kasy!
MINIGUN_BUY = Kupiles obrotowke za $%i.
MINIGUN_FOR_BUY = Zeby kupic obrotowke, wpisz w sayu /minigun
MINIGUN_PRICE = Koszt obrotowki - $%d
merkava is offline
CLLlAgOB
Senior Member
Join Date: Oct 2007
Location: Russia
Old 06-21-2009 , 08:34   Re: Minigun
Reply With Quote #28

Quote:
Originally Posted by joaquimandrade View Post

Code:
for(id = 1; id < g_MaxPlayers; id++) {
(Should be <= )

get_user_msgid("StatusText") should be cached.

if use <= id get max vavle 33
mb this
for(id = 0; id < g_MaxPlayers; id++)
id = min 1 max 32
CLLlAgOB is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-21-2009 , 08:37   Re: Minigun
Reply With Quote #29

It should be 33 if i'm right new g_MaxPlayers[ 33 ] = get_maxplayers ()
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-21-2009 , 08:40   Re: Minigun
Reply With Quote #30

A player's index can be 1 to 32 maximum. ( 0 is not valid ) But 32 because it's a 32 slots. If you have 16 slots, it will be 16 max. So the right usage is to loop between 1 and max_client included. so it should be "id <=".
__________________
Arkshine 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 20:16.


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