AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   About levels and level system (https://forums.alliedmods.net/showthread.php?t=295780)

Str4x3D1x 04-04-2017 11:51

About levels and level system
 
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:

Napoleon_be 04-04-2017 15:18

Re: About levels and level system
 
your plugin is just simply not running, provide your error log file with debug logs pls.

Str4x3D1x 04-04-2017 15:39

Re: About levels and level system
 
Quote:

Originally Posted by Napoleon_be (Post 2509353)
your plugin is just simply not running, provide your error log file with debug logs pls.

Log (strax.amxx is file name)

Snitch 04-05-2017 01:43

Re: About levels and level system
 
Quote:

Originally Posted by Str4x3D1x (Post 2509363)
Log (strax.amxx is file name)

https://pastebin.com/sbRf0mBC

Function "EveryLevel" was not found....

This pub/func not found useful i guess

Str4x3D1x 04-05-2017 08:25

Re: About levels and level system
 
Quote:

Originally Posted by Snitch (Post 2509479)
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 ?

Fuck For Fun 04-05-2017 09:48

Re: About levels and level system
 
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 ] );


Str4x3D1x 04-05-2017 09:58

Re: About levels and level system
 
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

Fuck For Fun 04-05-2017 10:07

Re: About levels and level system
 
Quote:

Originally Posted by Str4x3D1x (Post 2509561)
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


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

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