problems with some commands
#1

This cmd asking for help doesnt really work, when you type long words it will show to the admins, but the reason wont be shown

pawn Код:
dcmd_#(playerid, params[])
{
    new pid, string[210];
        if(sscanf(params, "us", pid, params[2])) return SendClientMessage(playerid, Yellow, "Usage: /# <message>");
    new help[MAX_PLAYER_NAME];
    GetPlayerName(playerid, help, sizeof(help));
    format(string, sizeof(string), "( # ) %s(ID: %i)",help, playerid, pid, params[2]);
    MessageToAdmins(AdminColor, string);
    SendClientMessage(playerid, Yellow, "Your message has been sent to admins.");
    return 1;
}
also when someone disconnects, get banned, gets kicked, or crashes, the leave messages doesnt work

Here is the code

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if(gPlayerLogged[playerid] == 1)
    if(playerid == g_DuelingID1 || playerid == g_DuelingID2)
    g_DuelInProgress = 0;
    GetPlayerName(playerid, name, sizeof(name));
    new string[64];
    switch(reason)
    {
        case 0: format(string, sizeof(string), "%s has left the server (Timedout)", name);
        case 1: format(string, sizeof(string), "%s has left the server (Leaving)", name);
        case 2: format(string, sizeof(string), "%s has left the server (Kicked)", name);
    }
    {
        dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    }
    gPlayerLogged[playerid] = 0;
    return 1;
}
Reply


Messages In This Thread
problems with some commands - by xir - 07.01.2011, 10:15
Re: problems with some commands - by Mean - 07.01.2011, 10:27
Re: problems with some commands - by xir - 07.01.2011, 10:47
Re: problems with some commands - by xir - 07.01.2011, 11:12
Re: problems with some commands - by Mean - 07.01.2011, 11:26
Re: problems with some commands - by xir - 07.01.2011, 11:47
Re: problems with some commands - by Mean - 07.01.2011, 12:35
Re: problems with some commands - by xir - 07.01.2011, 13:02

Forum Jump:


Users browsing this thread: 2 Guest(s)