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

Solved Level XP System


Post New Thread Reply   
 
Thread Tools Display Modes
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-22-2016 , 07:33   Re: Level XP System
Reply With Quote #11

somebody from ZPPV told me. I tested in a local server with podbots and it's working fine, I haven't got a Real server to test in. I can ask my friend later. I changed format --> formatex.
i will try to understand them ;) I called them but in client_putinserver, i think that's better.
I will put them in plugin_init , i changed from [33] to [32] but what's the point of it
__________________

Last edited by edon1337; 11-22-2016 at 10:07.
edon1337 is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 11-22-2016 , 14:30   Re: Level XP System
Reply With Quote #12

For proper test can you just use bots, you don't need real players, but do not forget that all the bots have the steamid "BOT" so they all have same keys wich means is not working fors bots, you have to make the save only for name ( if you wanne test alone ) and also i advice you to downloaad "Nvault Editor" . after you make a file, use the plugin and check the .vault file to see if is corectly saving ( That's also help you with logic ... how it works, etc ... )

- About client_putinserver, it's better if you want to take the name as Key, for SteamID use client_authorized.


- > And Do not forget, taking the name as key is ILLEGAL because is working also for non-steamers, if you require help with your scripts, please post examples with SteamID as a key, anyway ... is better using steamid for saving instead of name, you use names just for testing.

About:
PHP Code:
 give_item(id"weapon_hegrenade");
                
give_item(id"weapon_flashbang");
                
cs_set_user_bpammo(idCSW_HEGRENADE2)  
                
cs_set_user_bpammo(idCSW_FLASHBANG2)  
                
g_PlayerXP[id] = g_PlayerXP[id] - 75
                client_print_color
(idDontChange"^4You Just Got 2 HE And 2 FlashBangs, It Costed You 75 XP");
            } 
In my old levelmod i was giving also Deagle with 1 bullet or 2 , depedens of level, you can do the same but i advice you to use my stock for giving weapon with specific ammo/bpammo: https://forums.alliedmods.net/showthread.php?t=278123 ( it avoids lot of problems for you ... )


About s_Amount[16], change it to 11.

"2147483647" is the maximum integer number that amxx holds, so , when you have to deal with Integer ammouns, if they are string and converted later for integers, put '11' as size.



I do not know about your tasks problem, because i don't understand what are you doing there.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-22-2016 , 14:47   Re: Level XP System
Reply With Quote #13

Yeah, I've tested with bots in "Start New Game" then by starting a HLDS server. It works fine , we'll test this in a real server tomorrow. I wouldn't use name as the key because people change it everytime. Changed to client_authorized, Can you give me the right example on how to use your stock in my case? Changed to 11. Thanks man.
__________________
edon1337 is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 11-22-2016 , 15:29   Re: Level XP System
Reply With Quote #14

Quote:
Originally Posted by edon1337 View Post
I wouldn't use name as the key because people change it everytime. Changed to client_authorized.
Yes, just use the SteamId.

Quote:
Can you give me the right example on how to use your stock in my case?


Replace this:

PHP Code:
        give_item(id"weapon_hegrenade");
                
give_item(id"weapon_flashbang");
                
cs_set_user_bpammo(idCSW_HEGRENADE2)  
                
cs_set_user_bpammo(idCSW_FLASHBANG2)  
                
g_PlayerXP[id] = g_PlayerXP[id] - 75
                client_print_color
(idDontChange"^4You Just Got 2 HE And 2 FlashBangs, It Costed You 75 XP"); 

With this:




PHP Code:

        give_user_weapon 
id CSW_HEGRENADE);
        
give_user_weapon id CSW_FLASHBANG);
        
give_user_weapon id CSW_DEAGLE);
        
g_PlayerXP[id] = gPlayerXP[id] - 75;

        
client_print_color(idDontChange"You just ^4bought^1 the following items: ^32HEGRENADES^1,^3 2FLASHBANGS^1, ^3DEAGLE 1 bullet ^1for^4 75^1 XP^1."); 

After you 'Install' my stock.
__________________
Project: Among Us

Last edited by Craxor; 11-22-2016 at 15:35.
Craxor is offline
Send a message via ICQ to Craxor
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 11:28.


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