AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ HELP ] Scripting error. (https://forums.alliedmods.net/showthread.php?t=273073)

Banana. 10-11-2015 18:48

[ HELP ] Scripting error.
 
I am coding with two problems.

1- I'm trying to remove the fakemeta of the zombie_plague but I have a compile error , this is the code:

PHP Code:

// Set the right model
if (get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS]))
{
    
iRand random_num(0ArraySize(model_admin_human) - 1)
    
ArrayGetString(model_admin_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
    if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_admin_humaniRand))


:arrow:
PHP Code:

// Set the right model
if (get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS]))
{
    
iRand random_num(0ArraySize(model_admin_human) - 1)
    
ArrayGetString(model_admin_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
    if (
g_set_modelindex_offsetcs_set_user_model(idArrayGetCell(g_modelindex_admin_humaniRand))


2- I tried this , but I am in error at compile time , the code is this:
PHP Code:

#include < amxmodx >
#include < fun >
#include < cstrike >
#include < fakemeta >
#include < hamsandwich >

#if defined CSCZBOT_SUPPORT
#include < cs_ham_bots_api >
#endif

#include < zombieplague >

#define CSCZBOT_SUPPORT //Uncomment this line to add damage support in CS/CZ bots 

PHP Code:

public plugin_init() 

    
// Hams 
    #if defined CSCZBOT_SUPPORT 
    
RegisterHamBots(Ham_TakeDamage"fw_TakeDamage"
    
#endif 


How to fix?

fysiks 10-11-2015 20:00

Re: [ HELP ] Scripting error.
 
Quote:

Originally Posted by Banana. (Post 2352226)
I'm trying to remove the fakemeta

Why would you do that?

Banana. 10-11-2015 21:00

Re: [ HELP ] Scripting error.
 
For optimize the zombie_plague40 code.

fysiks 10-11-2015 22:01

Re: [ HELP ] Scripting error.
 
Quote:

Originally Posted by Banana. (Post 2352255)
For optimize the zombie_plague40 code.

And why do you think removing fakemeta is an optimization?

Banana. 10-11-2015 22:28

Re: [ HELP ] Scripting error.
 
Quote:

Originally Posted by yokomo (Post 2350543)
I've review current progress on developer build it seems amxmodx has changes too much. You can try it.

For example cstrike module has been updated, you don't need to use any task (delay) to set player model/team. Also you have an option whether to send teaminfo or not. Also cs_set_user_model can use modelindex.. See cstrike.inc for details.

You can also remove all fakemeta stocks and replace it with cstrike/engine natives.. Engine module also been updated...


fysiks 10-11-2015 23:27

Re: [ HELP ] Scripting error.
 
So, you are formerly known as "CrazY." who is banned right now . . .

Chihuahuax 10-11-2015 23:40

Re: [ HELP ] Scripting error.
 
Yeah "forget about the past n keep on movin forward" lol


Btw
Code:

#define CSCZBOT_SUPPORT
should be placed before
Code:

if #defined blabla

fysiks 10-12-2015 00:09

Re: [ HELP ] Scripting error.
 
Quote:

Originally Posted by Chihuahuax (Post 2352283)
Btw
Code:

#define CSCZBOT_SUPPORT
should be placed before
Code:

if #defined blabla

You should probably test code before you post it.

Chihuahuax 10-12-2015 00:17

Re: [ HELP ] Scripting error.
 
At least thats what I saw on a working plugin

Cant test it bcoz im not with my pc

Depresie 10-12-2015 05:58

Re: [ HELP ] Scripting error.
 
do you use amxmodx 1.8.3 for compiling? also, post the error


All times are GMT -4. The time now is 22:17.

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