AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Change the natives? (https://forums.alliedmods.net/showthread.php?t=225652)

MrKiller2010 09-07-2013 12:10

Change the natives?
 
PHP Code:

native hnsxp_get_user_xp(client);
 
native hnsxp_set_user_xp(clientxp);
 
stock hnsxp_add_user_xp(clientxp)
{
        return 
hnsxp_set_user_xp(clienthnsxp_get_user_xp(client) + xp);
}
 
stock hnsxp_sub_user_xp(clientxp)
{
        return 
hnsxp_set_user_xp(clienthnsxp_get_user_xp(client) - xp);


I want that to this:

PHP Code:

public plugin_natives()
{
    
register_native("pm_set_user_points""_set_user_points");
    
register_native("pm_get_user_points""_get_user_points");
    
register_native("pm_get_user_maxhealth""_get_user_maxhealth");
    
register_native("pm_add_user_points""_add_user_points");
    
register_native("pm_get_user_totalpoints""_get_user_totalpoints");



ConnorMcLeod 09-07-2013 13:11

Re: Change the natives?
 
So, use this.

MrKiller2010 09-07-2013 13:16

Re: Change the natives?
 
Quote:

Originally Posted by ConnorMcLeod (Post 2030071)
So, use this.

Well, the first code is for the block maker.
And the second is the XPMOD which is actually a Point mod.
I want to be able to have Point Blocks on the Block maker.
So i need to take the natives and replace them on the first code i wrote..

MrKiller2010 09-07-2013 14:55

Re: Change the natives?
 
Quote:

Originally Posted by ConnorMcLeod (Post 2030071)
So, use this.

Quote:

Originally Posted by LordOfNothing (Post 2030089)
and why dont do this ?

how?
I dont think u get me..

ConnorMcLeod 09-07-2013 15:28

Re: Change the natives?
 
We got you, but nobody can do anything for you with provided information.

MrKiller2010 09-07-2013 15:29

Re: Change the natives?
 
Quote:

Originally Posted by ConnorMcLeod (Post 2030181)
We got you, but nobody can do anything for you with provided information.

So you need the whole PointMod inorder to do this?

I managed to make a pointmod.inc
But i get this error now:

PHP Code:

new const g_blank[] =               ""

Code:

Error: Expected token: ";", but found "new" on line 35

ConnorMcLeod 09-07-2013 15:36

Re: Change the natives?
 
Basic knowledge... and you want to implement dynamic natives !!

Seems a semicolon is missing on previous line end.

MrKiller2010 09-07-2013 15:41

Re: Change the natives?
 
Quote:

Originally Posted by ConnorMcLeod (Post 2030181)
We got you, but nobody can do anything for you with provided information.

Quote:

Originally Posted by ConnorMcLeod (Post 2030195)
Basic knowledge... and you want to implement dynamic natives !!

Seems a semicolon is missing on previous line end.

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#include <pointmod>

#pragma semicolon 1
 
#define PLUGIN_NAME                             "SK"
#define PLUGIN_VERSION                          "1.0"
#define PLUGIN_AUTHOR                           "MrKiller"
#define PLUGIN_PREFIX                           "SK"
 
new const g_blank[] =                           "";
new const 
g_a[] =                               "a";
new const 
g_b[] =                               "b";
 
new const 
g_block_classname[] =                 "BM_Block";
new const 
g_start_classname[] =                 "BM_TeleportStart";
new const 
g_destination_classname[] =           "BM_TeleportDestination";
new const 
g_light_classname[] =                 "BM_Light"


ConnorMcLeod 09-07-2013 15:49

Re: Change the natives?
 
Check line 34, don't be stupid, paste/attach whole code + include files if you want someone being able to help you in any way.

When you want to make your car being repaired, you don't only bring the wheel at garage.

MrKiller2010 09-07-2013 15:50

Re: Change the natives?
 
Quote:

Originally Posted by ConnorMcLeod (Post 2030205)
Check line 34, don't be stupid, paste/attach whole code + include files if you want someone being able to help you in any way.

Well, there is nothing on line 34.


All times are GMT -4. The time now is 19:09.

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