Raised This Month: $ Target: $400
 0% 

[SOLVED] Write Name in file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 09-17-2015 , 13:49   [SOLVED] Write Name in file
Reply With Quote #1

Hi , i want to make an easy code. i'm not good in english but i'll try to explaint :
Commands : amx_name "Player Name" And the player name will be registred in a .txt file ??
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |

Last edited by Dr Zayd; 09-18-2015 at 13:04.
Dr Zayd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-17-2015 , 20:25   Re: [REQ] Write Name in file
Reply With Quote #2

This is the Scripting Help forum so post the code that you tried and explain exactly what you are having trouble doing with your code and then we'll be able to help you out.
__________________
fysiks is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 09-18-2015 , 09:18   Re: [REQ] Write Name in file
Reply With Quote #3

Scripting Help is for helping fix/improve your code

If you are looking for something and can't find it, post in the Suggestions/Requests
redivcram is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 09-18-2015 , 13:04   Re: [REQ] Write Name in file
Reply With Quote #4

Sorry but solved Thanks fysiks
Here is the code what i was needed :
PHP Code:
#define FILE "names.ini"
public ngfnBanName(idlevelcid) {
    if(!
cmd_access(idlevelcid2) || look_file == 0)
        return 
PLUGIN_HANDLED;

    new 
param[48], target;
    
read_argv(0paramcharsmax(param));
    new 
bool:isBan equali(param"ng_warn") ? true false;
    
read_argv(1paramcharsmax(param));
    if(
isBan) {
        
target cmd_target(idparam);
        if(!
target)
            return 
PLUGIN_HANDLED;

        
get_user_name(targetparamcharsmax(param));
    }
//    if(checkName(param)) {
//        console_print(id, "Already Warned");
//        return PLUGIN_HANDLED;
//    }
    
write_file(g_cfgparam);
    
console_print(id"Warning");

    
ArrayPushString(a_ban_namesparam);
    
array_size ArraySize(a_ban_names);

    if(
isBan)
        
server_cmd("amx_kick #%d ^"warn^""get_user_userid(target));

    return 
PLUGIN_HANDLED;

i get it from warning system :p
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
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 22:15.


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