This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Hangs up during connection.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bos93
Veteran Member
Join Date: Jul 2010
Old 12-18-2012 , 15:02   Hangs up during connection.
Reply With Quote #1

PHP Code:
int zbm3_register_zombie_classchar chName[ ], char chModel[ ], char chClaws[ ],  ZombieData aZombieData )
{

    if( 
g_cLoadedClasses >= MAX_CLASSES )
        return -
1;
        
    
strcpyg_chZombieNameg_cLoadedClasses ], chName );
    
strcpyg_chZombieModelg_cLoadedClasses ], chModel );
    
strcpyg_chZombiePModelg_cLoadedClasses ], chClaws );

    
g_aZombieDatag_cLoadedClasses ].ZombieGravity aZombieData.ZombieGravity;
    
g_aZombieDatag_cLoadedClasses ].ZombieSpeed aZombieData.ZombieSpeed;
    
g_aZombieDatag_cLoadedClasses ].ZombieAbilityDelay aZombieData.ZombieAbilityDelay;
    
g_aZombieDatag_cLoadedClasses ].ZombieKnockback aZombieData.ZombieKnockback;


    
    
char pszModel128 ];
    
sprintf_spszModel"models/player/%s/%s.mdl"chModelchModel );
    
g_iModelIndexg_cLoadedClasses ] = PRECACHE_MODELpszModel );
    
pszModel] = '\0';
    
sprintf_spszModel"models/zb4/%s"chClaws );
    
PRECACHE_MODELpszModel );

    
g_cLoadedClasses++;
    
    return 
g_cLoadedClasses 1;

PHP Code:
ZombieData GHOST_DATA    =
{
    
0.75,    // Gravity
    
280.0,    // Speed
    
7.0,    // Ability Cooldown
    
1.5    // Knockback
}; 
PHP Code:
int PRECACHE_GHOST( )
{

    
g_pClassGhost zbm3_register_zombie_class"Ghost""zb4_ghost""v_ghost.mdl"GHOST_DATA );    

    
RETURN_META_VALUE(MRES_IGNORED0);

Where is problem?


On amxx I need in

param_convert(1);
param_convert(2);
param_convert(3);

How to apply it?
__________________

Last edited by Bos93; 12-19-2012 at 11:54.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 12-18-2012 , 15:20   Re: Hangs up during connection.
Reply With Quote #2

You can't use that. Open "fun.cpp" and look how natives are done.
__________________
micapat is offline
twix_p
Member
Join Date: Jul 2011
Old 12-18-2012 , 15:34   Re: Hangs up during connection.
Reply With Quote #3

Quote:
Originally Posted by Bos93 View Post
[PHP]
On amxx I need in

param_convert(1);
param_convert(2);
param_convert(3);

How to apply it?
On amxx you need param_convert becouse you transform function to native and you use it in other plugin.

If you try to register a zombie class direct in ZPA base plugin ( not in other extra), by "native_register_zombie_class" you need to delete all param_convert(); or you get an error.

I remember that happened to me, maybe will be same with your module becouse the code its very similar.
So, maybe you dont need param_convert and this is not the cause for your problem.

PHP Code:

native_register_zombie_class
(name[], info[],model[], clawmodel[], hpspeedFloatgravityFloat:knockback)
{
    static 
prec_mdl128 ];
    
ArrayPushString(g_zclass_namename)
    
ArrayPushString(g_zclass_infoinfo)
    
ArrayPushString(g_zclass_playermodelmodel)
    
ArrayPushString(g_zclass_clawmodelclawmodel)

    
ArrayPushCell(g_zclass_hphp)
    
ArrayPushCell(g_zclass_spdspeed)
    
ArrayPushCell(g_zclass_gravgravity)
    
ArrayPushCell(g_zclass_kbknockback)

    
formatex(prec_mdlcharsmax(prec_mdl), "models/player/%s/%s.mdl"modelmodel)
    
precache_model(prec_mdl)

    
formatex(prec_mdlcharsmax(prec_mdl), "models/zombie_plague/%s"clawmodel)
    
precache_model(prec_mdl)

    
g_zclass_i++

    return 
g_zclass_i 1;


Last edited by twix_p; 12-18-2012 at 15:37.
twix_p is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 12-18-2012 , 17:52   Re: Hangs up during connection.
Reply With Quote #4

@ twix_p
This is not c/c++
This is Pawn !
TheDS1337 is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-19-2012 , 00:33   Re: Hangs up during connection.
Reply With Quote #5

You're not telling too much what's your problem or what do you need.

Try to express deeply, even if you need a translator.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Bos93
Veteran Member
Join Date: Jul 2010
Old 12-19-2012 , 04:42   Re: Hangs up during connection.
Reply With Quote #6

no connection on server
Attached Thumbnails
Click image for larger version

Name:	БезымÑнный.png
Views:	141
Size:	17.3 KB
ID:	113382  
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
twix_p
Member
Join Date: Jul 2011
Old 12-19-2012 , 06:52   Re: Hangs up during connection.
Reply With Quote #7

Quote:
Originally Posted by DeagLe.Studio View Post
@ twix_p
This is not c/c++
This is Pawn !
OMG another genius, Confucius boy are you shure?? IS this realy?
READ my post and understend essence and moral, both types have something in common.
twix_p is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 12-19-2012 , 10:55   Re: Hangs up during connection.
Reply With Quote #8

Show your whole code maybe, or a bigger part, because what you have done seems ok.

Btw, for a project like this, it will be better to start to structure your code ...
__________________
micapat is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 12-19-2012 , 17:18   Re: Hangs up during connection.
Reply With Quote #9

Are you trying to convert each line from Zombie Plague SMA file to CPP?
Do you think this will be helpful?
If you want a private thing that belongs to you and you will never publish it, make one but without many customizations. It will definitely increase the server's performance.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Bos93
Veteran Member
Join Date: Jul 2010
Old 12-20-2012 , 07:03   Re: Hangs up during connection.
Reply With Quote #10

It not Zombie Plague
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
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 13:16.


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