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

need small help!


Post New Thread Reply   
 
Thread Tools Display Modes
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-25-2017 , 06:45   Re: need small help!
Reply With Quote #21

Quote:
Originally Posted by bakir123 View Post
but i still need one more thing
i want to change authid to name
i want it work for name
not for authid
All you have to do is replace all get_user_authid with get_user_name
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-25-2017 , 09:35   Re: need small help!
Reply With Quote #22

Quote:
Originally Posted by Black Rose View Post
Code:
#include <amxmodx> #include <nvault> #include <fun> new ghnVault; new ghpcvarFrequency; public plugin_init() {     register_plugin("Give M4A1 by command", "1.0", "[ --{-@ ]");     ghnVault = nvault_open("GiveM4A1");     if ( ghnVault == INVALID_HANDLE )         set_fail_state("Couldn't open vault");     register_clcmd("say /gun", "user_clcmd");     ghpcvarFrequency = register_cvar("give_m4a1_frequency", "86400"); } public plugin_end()     nvault_close(ghnVault); public user_clcmd(id) {     new AuthID[32];     get_user_authid(id, AuthID, 31);     new curTime = get_systime();     new lastUsed = nvault_get(ghnVault, AuthID);     new giveFreq = get_pcvar_num(ghpcvarFrequency);     new outString[32];     if ( lastUsed + giveFreq > curTime ) {         TimerFormat(1000 * ( giveFreq - ( curTime - lastUsed ) ), outString, charsmax(outString), 2);         client_print(id, print_chat, "You have to wait %s to use this command again!", outString);         return;     }     give_item(id, "weapon_m4a1");     num_to_str(curTime, outString, charsmax(outString));     nvault_set(ghnVault, AuthID, outString); } #define TimerDays(%0)         ( %0 / 86400000 ) #define TimerHours(%0)      ( %0 % 86400000 / 3600000 ) #define TimerMinutes(%0)        ( %0 % 3600000 / 60000 ) #define TimerSeconds(%0)        ( %0 % 60000 / 1000 ) #define TimerMilliseconds(%0)   ( %0 % 1000 ) stock TimerFormat(hTimer, output[], maxlen, mode = 1, bool:full = false) {     new len;         if ( full || TimerDays(hTimer) )         len = formatex(output, maxlen, mode == 1 ? "%02d:" : "%dd ", TimerDays(hTimer));     if ( full || ( len && mode == 1 ) || TimerHours(hTimer) )         len += formatex(output[len], maxlen - len, mode == 1 ? "%02d:" : "%dh ", TimerHours(hTimer));     if ( full || ( len && mode == 1 ) || TimerMinutes(hTimer) )         len += formatex(output[len], maxlen - len, mode == 1 ? "%02d:" : "%dm ", TimerMinutes(hTimer));     if ( full || ( len && mode == 1 ) || TimerSeconds(hTimer) )         len += formatex(output[len], maxlen - len, mode == 1 ? "%02d." : "%ds ", TimerSeconds(hTimer));     if ( full || ! len || mode == 1 || TimerMilliseconds(hTimer) )         len += formatex(output[len], maxlen - len, mode == 1 ? "%03d" : "%dms", TimerMilliseconds(hTimer)); }
pure genius
__________________
edon1337 is offline
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 02-27-2017 , 06:53   Re: need small help!
Reply With Quote #23

Quote:
Originally Posted by edon1337 View Post
pure genius
100%
bakir123 is offline
Send a message via Skype™ to bakir123
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 17:12.


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