I'm blind, help me @y_commands
#1

I'm sleepy as hell and I need to finish a few things before I go to bed, so please tell me what the hell is wrong because I can't see.

pawn Код:
YCMD:invite(playerid, params[], help)
{
    #pragma unused help

    if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][pCop] != 2)
    {
        SendClientMessage(playerid, -1, "You are not an Admin or a Cop chief.");
    }
    else if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pCop] == 2)
    {
        new PlayerID, PlayerName[MAX_PLAYER_NAME], TargetName[MAX_PLAYER_NAME], string[128];

        if(sscanf(params, "u", PlayerID)) return SendClientMessage(playerid, -1, "Usage mode: /invite [PlayerName / ID]");

        if(PlayerID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "[ERROR] Invalid ID.");

        PlayerInfo[PlayerID][pCop] = 1;

        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        GetPlayerName(PlayerID, TargetName, sizeof(TargetName));

        format(string, sizeof(string), "You have been promoted to cop by %s.", PlayerName);
        SendClientMessage(PlayerID, -1, string);

        format(string, sizeof(string), "You have invited %s to cop.", TargetName);
        SendClientMessage(playerid, -1, string);
    }
    return 1;
}
Reply


Messages In This Thread
I'm blind, help me @y_commands - by notepad - 29.04.2012, 22:32
Re: I'm blind, help me @y_commands - by Jack_Rocker - 29.04.2012, 22:40
Re: I'm blind, help me @y_commands - by stormchaser206 - 29.04.2012, 22:41
Re: I'm blind, help me @y_commands - by notepad - 29.04.2012, 22:42
Re: I'm blind, help me @y_commands - by Jack_Rocker - 29.04.2012, 22:45
Re: I'm blind, help me @y_commands - by notepad - 29.04.2012, 22:48
Re: I'm blind, help me @y_commands - by Jack_Rocker - 29.04.2012, 22:50
Re: I'm blind, help me @y_commands - by notepad - 29.04.2012, 22:51
Re: I'm blind, help me @y_commands - by SuperViper - 30.04.2012, 04:05

Forum Jump:


Users browsing this thread: 1 Guest(s)