Need help with my commands
#8

Quote:
Originally Posted by Juvanii
Посмотреть сообщение
pawn Код:
stock GetName(playerid)
{
    new name[64];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
IRCCMD:getinfo(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
        new msg[256], playerid;
        if(sscanf(params, "u", playerid)) return 1;
        if(!IsPlayerConnected(playerid)) return 1;
        format(msg, sizeof(msg), "Name: %s | IP: %s | Score: %d | Ping: %i | Health: %.2f | Armour: %.2f ", GetPlayerName(playerid), GetPlayerIp(playerid),
        GetPlayerScore(playerid), GetPlayerPing(playerid), GetPlayerHealth(playerid), GetPlayerArmour(playerid));
        IRC_GroupSay(groupID, channel, msg);
    }
    return 1;
}
IRCCMD:force(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
        new msg[128], reason[128],playerid;
        if(sscanf(params, "us[128]", playerid,reason)) return 1;
        if(!IsPlayerConnected(playerid) return 1;
        format(msg, sizeof(msg), "%s has been forced to go into class selection screen by admin %s | Reason: %s" GetName(playerid), user, reason);
        IRC_GroupSay(groupID, channel, msg), SendClientMessageToAll(0xDDDD2357, msg);
        ForceClassSelection(playerid);
    }
    return 1;
}
wrong this will show errors as you are missing a braket

pawn Код:
IRCCMD:getinfo(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
        new
            msg[128],
            playerid,
            name[MAX_PLAYER_NAME],
            Float:health,
            Float:armour,
            ip[16],
            score,
        ;

        if (sscanf(params, "u", playerid)) return 1;
        if (!IsPlayerConnected(playerid)) return 1;
        GetPlayerName(playerid , name , sizeof(name));
        GetPlayerIP(playerid, ip, sizeof(ip));
        GetPlayerHealth(playerid, health);  
        GetPlayerArmour(playerid, armour);
        format(msg, sizeof(msg), "Name: %s | IP: %s | Score: %d | Ping: %i | Health: %i | Armour: %i ",name, ip, GetPlayerScore(playerid), GetPlayerPing(playerid),ping, health, armour); //Line 508
        IRC_GroupSay(groupID, channel, msg);
    }
    return 1;
}

IRCCMD:force(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
        new msg[128], reason[128],playerid;
        if(sscanf(params, "us[128]", playerid,reason)) return 1;
        if(!IsPlayerConnected(playerid)) return 1;
        format(msg, sizeof(msg), "%s has been forced to go into class selection screen by admin %s | Reason: %s" GetName(playerid), user, reason);
        IRC_GroupSay(groupID, channel, msg), SendClientMessageToAll(0xDDDD2357, msg);
        ForceClassSelection(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
Need help with my commands - by YahyaBR - 28.03.2015, 06:41
Re: Need help with my commands - by oliverrud - 28.03.2015, 08:04
Re: Need help with my commands - by YahyaBR - 28.03.2015, 08:29
Re: Need help with my commands - by Juvanii - 28.03.2015, 09:11
Re: Need help with my commands - by YahyaBR - 28.03.2015, 09:33
Re: Need help with my commands - by oliverrud - 28.03.2015, 09:37
Re: Need help with my commands - by Juvanii - 28.03.2015, 09:49
Re: Need help with my commands - by JeaSon - 28.03.2015, 12:30
Re: Need help with my commands - by YahyaBR - 28.03.2015, 15:34

Forum Jump:


Users browsing this thread: 1 Guest(s)