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


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

About levels and level system


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Str4x3D1x
Member
Join Date: Feb 2014
Old 04-04-2017 , 11:51   About levels and level system
Reply With Quote #1

Hello!
I truly hope this is not in wrong section of forum.
I tried making some level system where you get levels by...killing. xD

I followed this tutorial.
Fixed few errors because author didn't test his own code before saying it works but that doesn't matter.
Now the thing is that i compiled it successfully and i am pretty much not sure if it works. I haven't made any level check (when player types /level or /xp and it shows his level), i don't know how to do that, so it makes me a bit worried does plugin work ?

In above mentioned thread, as i can see the plugin has some cvars and HUD.
None of these are shown on my HLDS (yeah i am using Dedicated Server CURRENTLY). So, it might be due that, or not i don't know. Can you guys say if this thing works ?

Another thing I REALLY NEED is to make it so player unlock knife ONLY if he/she has level for that knife. I've made some knives in menu, i found models (but i don't know how to insert them to code). So when player selects knife from menu, he will get message that he don't have required level for that knife, and if he has level for that knife, he will get model of knife.

Anyone who can help me out with this ?

CODE:

Last edited by Str4x3D1x; 04-05-2017 at 17:26.
Str4x3D1x is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-04-2017 , 15:18   Re: About levels and level system
Reply With Quote #2

your plugin is just simply not running, provide your error log file with debug logs pls.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Str4x3D1x
Member
Join Date: Feb 2014
Old 04-04-2017 , 15:39   Re: About levels and level system
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
your plugin is just simply not running, provide your error log file with debug logs pls.
Log (strax.amxx is file name)

Last edited by Str4x3D1x; 04-05-2017 at 17:25.
Str4x3D1x is offline
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 04-05-2017 , 01:43   Re: About levels and level system
Reply With Quote #4

Quote:
Originally Posted by Str4x3D1x View Post
Log (strax.amxx is file name)

https://pastebin.com/sbRf0mBC
Function "EveryLevel" was not found....

This pub/func not found useful i guess
__________________
Қазақстан Республикасы
Snitch is offline
Send a message via Skype™ to Snitch
Str4x3D1x
Member
Join Date: Feb 2014
Old 04-05-2017 , 08:25   Re: About levels and level system
Reply With Quote #5

Quote:
Originally Posted by Snitch View Post
Function "EveryLevel" was not found....

This pub/func not found useful i guess
Yeah, i just realized that i forgot to add that function. Thanks !
Anyways, how to connect levels with each knife ? I want each knife to be unlocked by each level so player can't select knife if he doesn't have required level. Anyone knows ?
Str4x3D1x is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 04-05-2017 , 09:48   Re: About levels and level system
Reply With Quote #6

Example:
remmeber to
public plugin_precache( )
Code:
    enum _:eblabla
    {
    szKnifeName[ 45 ],
    iKnifeLevel
    }
Code:
    new const szblabla[ ] [ eblabla ] =
    {
    /* Knife Name, Level needed,*/
   
    { "Normal Knife", 1, },
    { "#1", 5, },
    
    }
pub of knife menu
Code:
    
    formatex( szMenu, charsmax( szMenu ), "\w%s \d[\rLOCKED \d- \rREQUIRES LEVEL %d\d]", szblabla[ Index ] [ szKnifeName ], szblabla[ Index ] [ PlayerLevel ] );
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Str4x3D1x
Member
Join Date: Feb 2014
Old 04-05-2017 , 09:58   Re: About levels and level system
Reply With Quote #7

Wait, but what does

sz stands for ?

Code:
enum Knife
{
Thunder Knife[ 45 ],
2
}
What is [45] and what is sz ?
Also what do i replace szMenu with ?

I didn't really understand that :s

Last edited by Str4x3D1x; 04-05-2017 at 09:58.
Str4x3D1x is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 04-05-2017 , 10:07   Re: About levels and level system
Reply With Quote #8

Quote:
Originally Posted by Str4x3D1x View Post
Wait, but what does

sz stands for ?

Code:
enum Knife
{
Thunder Knife[ 45 ],
2
}
What is [45] and what is sz ?
Also what do i replace szMenu with ?

I didn't really understand that :s
Code:
    enum _:eblabla
    {
    szKnifeName[ 45 ],
    iKnifeLevel
    }
45 is the size of knives name, sz is nothing just name i used for enums

but szKnifeName
you use in menu to see knives names:
Code:
formatex( szMenu, charsmax( szMenu ), "\w%s \d[\rLOCKED \d- \rREQUIRES LEVEL %d\d]",
szblabla[ Index ] [ szKnifeName ], szblabla[ Index ] [ PlayerLevel ] );
read here:
https://forums.alliedmods.net/showthread.php?t=140103

about enum

Last edited by Fuck For Fun; 04-05-2017 at 10:08.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
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 01:04.


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