AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Write Name in file (https://forums.alliedmods.net/showthread.php?t=271679)

Dr Zayd 09-17-2015 13:49

[SOLVED] Write Name in file
 
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 ??

fysiks 09-17-2015 20:25

Re: [REQ] Write Name in file
 
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.

redivcram 09-18-2015 09:18

Re: [REQ] Write Name in file
 
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

Dr Zayd 09-18-2015 13:04

Re: [REQ] Write Name in file
 
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


All times are GMT -4. The time now is 22:15.

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