Raised This Month: $ Target: $400
 0% 

help with plugin


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-15-2015 , 09:05   Re: help with plugin
Reply With Quote #11

Then you're not doing it right.

//Edit: I didn't really see the code.

show(id) => show(id, level, cid)

And add this in the beggining of the function:

PHP Code:
if(!cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED 

Last edited by OciXCrom; 11-15-2015 at 09:07.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
vase070
Senior Member
Join Date: Jun 2011
Old 11-15-2015 , 10:18   Re: help with plugin
Reply With Quote #12

Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define STR_LEN 32
public plugin_init() {
    register_plugin("Show IP,Steam Id and Map", "0.1", "HoBaK")
    register_concmd("amx_showip", "show", ADMIN_RCON, "List with player nick,ip,steam id and map to moment.")
}
public show(id, level, cid)
{
    if(!cmd_access(id , level , cid , 1)) 
        return PLUGIN_HANDLED; 
    new players[32], num
    get_players(players, num)
    console_print(id, "=============All Joined players on this server============")
    console_print(id, "")
    console_print(id, " - NickName  -       IP Adress          -                 Steam ID          -                 Team")

    for(new i = 0; i < num; i++)
    {        
        new name[32];
        new szIp[32];
        new steamid[32];
        new team[32];
        get_user_name(players[i], name, charsmax(name))
        get_user_ip(players[i], szIp, charsmax(szIp), 0)
        get_user_authid(players[i], steamid , charsmax(steamid))
        get_user_team(players[i], team, charsmax(team))
        console_print(id, " - %s  -  %s       -   %s   - %s", name, szIp, steamid, team)
    }

    return PLUGIN_HANDLED
}
did i do it right ? i'm so bad at coding ... compiles fine with no warnings or anything will test and write back ty
vase070 is offline
vase070
Senior Member
Join Date: Jun 2011
Old 11-15-2015 , 10:41   Re: help with plugin
Reply With Quote #13

tested plugin everything is working great ty alot OciXCrom
vase070 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 09:40.


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