6 Errors (+REP)
#8

pawn Code:
for(new i = 0; i <= MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
   OnPlayerConnect(i); //Error line
        }
    }
    //--------------------------------------------------------------------------
    for(new i = 1; i < MAX_REPORTS; i++)
    {
        Reports[i] = "No Reports Found";
    }
    //--------------------------------------------------------------------------

pawn Code:
CMD:changename(playerid, params[])
{
    if(AccInfo[playerid][pVip] > 2)
    {
        new NpName[MAX_PLAYER_NAME], stringf[128];
        //----------------------------------------------------------------------
        if(sscanf(params, "s[24]", NpName)) return
        SendClientMessage(playerid, orange, "Usage: /cmyname [New Nickname]");
        //----------------------------------------------------------------------
        else
        {
            SetPlayerName(playerid, NpName);
            format(stringf, sizeof(stringf), "You have Successfully Changed your nickname to {11FF00}%s!", NpName);
            SendClientMessage(playerid, orange, stringf);
            return OnPlayerConnect(playerid); //Error line
        }
    }
    else return SendClientMessage(playerid, red, "ERROR: You must be VIP Level 2 to use this command!");

pawn Code:
CMD:setname(playerid,params[])
{
    if(AccInfo[playerid][Level] >= 4 || IsPlayerAdmin(playerid))
    {
        new player1, tmp2[MAX_PLAYER_NAME], string[128];
        //----------------------------------------------------------------------
        if(sscanf(params, "us[24]", player1, tmp2)) return
        SendClientMessage(playerid, LIGHTBLUE2, "Usage: /setname [PlayerID] [NewName]") &&
        SendClientMessage(playerid, orange, "Function: Will set Name of specified player!");
        //----------------------------------------------------------------------
        if(strlen(tmp2) < 3 || strlen(tmp2) > MAX_PLAYER_NAME) return
        SendClientMessage(playerid,red,"ERROR: Incorrect Name Length");
        //----------------------------------------------------------------------
        if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return
        SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
        //----------------------------------------------------------------------
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
        {
            SendCommandToAdmins(playerid,"SetName");
            format(string, sizeof(string), "|- You have set \"%s's\" Name to \"%s\" -|", pName(player1), tmp2);
            SendClientMessage(playerid,BlueMsg,string);
            if(player1 != playerid)
            {
                format(string,sizeof(string),"|- Administrator \"%s\" has set your Name to \"%s\" -|", pName(playerid), tmp2);
                SendClientMessage(player1,blue,string);
            }
            SetPlayerName(player1, tmp2);
            return OnPlayerConnect(player1); //Error line
        }
        else return ErrorMessages(playerid, 2);
    }
    else return ErrorMessages(playerid, 1);
}
Reply


Messages In This Thread
6 Errors (+REP) - by Spartaaaaa - 14.05.2014, 14:49
Re: 6 Errors (+REP) - by daemon3304 - 14.05.2014, 14:57
Re: 6 Errors (+REP) - by nilanjay - 14.05.2014, 15:41
Re: 6 Errors (+REP) - by Spartaaaaa - 14.05.2014, 15:43
Re: 6 Errors (+REP) - by Salman1700 - 14.05.2014, 16:51
Re: 6 Errors (+REP) - by Spartaaaaa - 14.05.2014, 17:07
AW: 6 Errors (+REP) - by Macronix - 14.05.2014, 17:26
Re: 6 Errors (+REP) - by Spartaaaaa - 15.05.2014, 09:52
Re : 6 Errors (+REP) - by yusei - 15.05.2014, 10:23
Re: 6 Errors (+REP) - by Spartaaaaa - 15.05.2014, 10:39

Forum Jump:


Users browsing this thread: 3 Guest(s)