Raised This Month: $ Target: $400
 0% 

Solved set_user_maxspeed with level


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
1M1e
Member
Join Date: Mar 2020
Old 07-23-2021 , 17:02   set_user_maxspeed with level
Reply With Quote #1

hi,

i tried to make who in level 5 he will get speed

For zombie 20
for human 50
but it dose not work

can someone tell me whats the problem?

Code:
#include <zombie_escape>
#include <crxranks>
#include <fun>
 
#define ITEMS1 5
 
public plugin_init()
{
    register_plugin("[ZE] Bonus With Level", "0.1", "whatever")
    register_event("HLTV", "new_round", "a", "1=0", "2=0");
}

public new_round()
{
    set_task(1.0, "BonusLevel")
}
 
public BonusLevel(id)
{
	if(ze_is_user_zombie(id))
	{
		if(crxranks_get_user_level(id) == ITEMS1)
		{
			set_user_maxspeed(id, get_user_maxspeed(id) +20)
		}
	}
	else
	{
		if(crxranks_get_user_level(id) == ITEMS1)
		{
			set_user_maxspeed(id, get_user_maxspeed(id) +50)
		}
	}
    
	return 1;
}

Last edited by 1M1e; 07-25-2021 at 02:28.
1M1e is offline
 



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 02:32.


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