Raised This Month: $32 Target: $400
 8% 

LevelMod 8.0 with knifeskins. [ML Support]


Post New Thread Reply   
 
Thread Tools Display Modes
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 11-28-2016 , 07:43   Re: LevelMod 6.0 with Knifeskins & Points
Reply With Quote #71

Quote:
Originally Posted by Visinescu View Post
Can you make it so it shows in chat the level you have when you type ?

Like [Level:5] Name: /rank ? i am pretty sure the players want to be seen with their level by everyone. after all there always search for competition.
This should be added as 'an exterior plugin' using levemod api not in the source itself.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
RiderBMX
New Member
Join Date: Nov 2016
Location: Pakistan
Old 12-01-2016 , 04:00   Re: LevelMod 6.0 with Knifeskins & Points
Reply With Quote #72

Gj. ironskillz1
RiderBMX is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 12-02-2016 , 17:01   Re: LevelMod 7.0 with Knifeskins & Points
Reply With Quote #73

Updated!! 7.0
Added iChat Compatibility and fixed some small bugs.

To enable iChat edit this "0" to a "1"
Code:
#define iChat_Tags 0
You also need to edit this line in the iChat plugin. which is in the ichat.cfg file
Code:
CHAT_USE_CUSTOM_TAGS 0
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 12-02-2016 at 17:01.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-22-2016 , 12:55   Re: LevelMod 7.0 with Knifeskins & Points
Reply With Quote #74

A little review

PHP Code:
        if((g_bGiveRemove = !g_bGiveRemove)) 
        {
            
g_bGiveRemove true
            
            menu_destroy
(menu);
            
Playerlistid 
            return 
PLUGIN_HANDLED
        
}
        else 
        {
            
g_bGiveRemove false
            
            menu_destroy
(menu);
            
Playerlistid 
            return 
PLUGIN_HANDLED
        


- >

PHP Code:
// will give the oposite, if is false, will set it to true, if is true, will set it to false
b_bGiveRemove = !b_GiveRemove
Playerlist
id )
// keep the same style, if you use PlayerList( id ) do the same everywhere
menu_destroymenu );
return 
PLUGIN_HANDLED

Same as here or everywhere:
PHP Code:

    g_iName
[id] = key 
Add ';" , you should keep the same arrangement style, user pragma semicolon 1 better to be sure.



Here:
PHP Code:
if( str_to_num(iAmount) >= 9999999 )
    {
        
ColorChat(idGREY"^4[%s]^1 You cant^3 %s^1 that much points"TAGg_bGiveRemove "remove" "give");
        return 
PLUGIN_HANDLED;
    }
    if(!
is_user_connected(g_iName[id]))
    {
        
ColorChat(idGREY"^4[%s]^1 User^3 %s^1 isnt connected"TAGszName[1]);
        return 
PLUGIN_HANDLED
    
}
    
    if( 
g_iLogadmin == )
    {
        new 
message[200], Time[64];
        
get_time("%c"Timecharsmax(Time)); 
        
format messagecharsmax(message), "[%s] %s %s %s %i points"TimeszName[0], g_bGiveRemove "took away" "gave"szName[1], str_to_num(iAmount));
        
write_file "addons/amxmodx/logs/levelmod.txt"message )
    }
    
    
ColorChat(0GREY"^4[%s]^3 %s^1 %s^3 %s^4 %i^1 points"TAGszName[0], g_bGiveRemove "took away" "gave"szName[1], str_to_num(iAmount));
    
    
set_hudmessage(25500, -1.00.101.07.00.11.0)
    
show_hudmessage0"[%s] %s %s %s %i points"TAGszName[0], g_bGiveRemove "took away" "gave"szName[1], str_to_num(iAmount)); 

Better a make a new variabile and do like that new iAmount = str_to_num( szAmountArg ), insteand of calling str_to_num everywhere.


- Add ML man <3


Here:
PHP Code:
    if( g_iPoints[id] >= g_szLevels[g_iLevel[id]+1] && g_szLevels[g_iLevel[id]+1] != 0)
    {
        
g_iLevel[id]++;
        
        if( 
g_iPoints[id] >= g_szLevels[g_iLevel[id]+1] && g_szLevels[g_iLevel[id]+1] != 0)
        {
            
CheckLevel(id)
            return 
PLUGIN_HANDLED
        

Why do you make the same checks lot of times in the same function ?

You could not just add CheckLevel(id) at the end of the function and force index to be checked in all the cases ?

Again your style, look here:
PHP Code:
if(is_user_alive(id)) 
in hamitem deploy function and now in the Message_Win public:
PHP Code:
if( g_iWin == 
Realy different styles, keep the same style everywhere.


Here:
PHP Code:
format(szAuthIdcharsmax(szAuthId), "%s%s"szAuthIdSPECIAL_CHAR
You DO NOT NEED a special Char for saving in nvault, the classic vault.inc requires a special char because all plugins saves keys and data in the vault.ini, but nvault create private files so you do not special chars.


Here
PHP Code:
/* ************ EDIT STARTS HERE ************ */

// Tag for messages in the plugin
#define TAG "LevelMod"

//What admin rank you should have to give points
#define ADMIN_LEVEL ADMIN_KICK

//Max levels 
#define MaxLevels 100

//Top number
#define TopNumber 15

//Max players
#define MAX_PLAYERS 32

//iChat tag support //1 to enable
#define iChat_Tags 0

/* ************ EDIT ENDS HERE ************** */ 
I may be wrong but i believe you could use constants here insteand of define#.

Another idea: insteand of lot of cvars variables, use enum to delcare them.

Here:
PHP Code:
    register_event"DeathMsg""Event_DeathMsg""a" ); 
You included hamsandwich no? Why not using Ham_Kill.
__________________
Project: Among Us

Last edited by Craxor; 12-22-2016 at 17:11.
Craxor is offline
Send a message via ICQ to Craxor
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 12-23-2016 , 10:33   Re: LevelMod 7.0 with Knifeskins & Points
Reply With Quote #75

New 8.0 version released. Optimized and added ML support.
Nothing is tested yet. But i will try to test it in a couple of days.


Quote:
Originally Posted by Craxor View Post
- Add ML man <3
Added

Quote:
Originally Posted by Craxor View Post
Here:
PHP Code:
    if( g_iPoints[id] >= g_szLevels[g_iLevel[id]+1] && g_szLevels[g_iLevel[id]+1] != 0)
    {
        
g_iLevel[id]++;
        
        if( 
g_iPoints[id] >= g_szLevels[g_iLevel[id]+1] && g_szLevels[g_iLevel[id]+1] != 0)
        {
            
CheckLevel(id)
            return 
PLUGIN_HANDLED
        

Why do you make the same checks lot of times in the same function ?

You could not just add CheckLevel(id) at the end of the function and force index to be checked in all the cases ?
If an admin gives a user alot of points he will lvl up alot of times. Instead of spamming the message 5x the chat will just show one message and thats his final level.

Quote:
Originally Posted by Craxor View Post
Here:
PHP Code:
format(szAuthIdcharsmax(szAuthId), "%s%s"szAuthIdSPECIAL_CHAR
You DO NOT NEED a special Char for saving in nvault, the classic vault.inc requires a special char because all plugins saves keys and data in the vault.ini, but nvault create private files so you do not special chars.
Now its to late, alot of people are using this plugin and there save file will get corrupted if i update that.

Quote:
Originally Posted by Craxor View Post
Here:
PHP Code:
    register_event"DeathMsg""Event_DeathMsg""a" ); 
You included hamsandwich no? Why not using Ham_Kill.
Because deathmsg detects hs and hamsandwich dont. Its possible to do a workaround that problem but i dont think its worth it because i anyway need to use cstrike.
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 12-23-2016 at 10:37.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-23-2016 , 10:54   Re: LevelMod 8.0 with knifeskins. [ML Support]
Reply With Quote #76

You still didn't make some of them constants but however.

Also they are lot of redundant bad coded things inside , you should make some changes.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 12-24-2016 , 15:18   Re: LevelMod 8.0 with knifeskins. [ML Support]
Reply With Quote #77

upgrade damage for admin and some item maybe invlisble + gravity + fast ...
yas17sin is offline
Send a message via ICQ to yas17sin
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 12-24-2016 , 18:27   Re: LevelMod 8.0 with knifeskins. [ML Support]
Reply With Quote #78

Quote:
Originally Posted by yas17sin View Post
upgrade damage for admin and some item maybe invlisble + gravity + fast ...
Sorry but im 100% against altering gameplay so it favours admin/vip, its just simply unfair as hell.
Anyhow i may add invisible, gravity and fast speed because that would work perfect for some gamemodes.
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
KoHb
Junior Member
Join Date: Sep 2017
Location: UA
Old 09-23-2017 , 12:03   Re: LevelMod 8.0 with knifeskins. [ML Support]
Reply With Quote #79

I've tested the last version and got next bugs:
1) g_pCvar_Dying (setted it to "1") is not working at all, it just ignore when you die and do nothing;
2) when i loose round then i get 1 or 2 times +points on round start (everytime after loosed round). It says in chat:
You got x points for winning the round (but not round was lost, and it should say in round end not on round start);
3) when im loosing points my level should downgrade on 1 position, but it do nothing and i still stay on higher level, but i have points less than required for this level. Only when i downgrade level on 2 positions then it works and display right level.
Can you take a look on this bugz and fix it plz?
__________________
KoHb is offline
KoHb
Junior Member
Join Date: Sep 2017
Location: UA
Old 09-27-2017 , 13:27   Re: LevelMod 8.0 with knifeskins. [ML Support]
Reply With Quote #80

Quote:
Originally Posted by KoHb View Post
I've tested the last version and got next bugs:
1) g_pCvar_Dying (setted it to "1") is not working at all, it just ignore when you die and do nothing;
2) when i loose round then i get 1 or 2 times +points on round start (everytime after loosed round). It says in chat:
You got x points for winning the round (but not round was lost, and it should say in round end not on round start);
3) when im loosing points my level should downgrade on 1 position, but it do nothing and i still stay on higher level, but i have points less than required for this level. Only when i downgrade level on 2 positions then it works and display right level.
Can you take a look on this bugz and fix it plz?
I tried to fix 3rd bug by replacing:

Code:
if(g_iLevel[id] != 0 && g_iPoints[id] <= g_szLevels[g_iLevel[id]-1])
=> on 345 & 349 lines =>

Code:
if(g_iLevel[id] != 0 && g_iPoints[id] < g_szLevels[g_iLevel[id]])
Seems to be working correct with every downgrade
__________________
KoHb is offline
Reply


Thread Tools
Display Modes

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 21:56.


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