Need Seriously Help
#1

Hello. I Need Help. My /unban CMD is not working. Need Help +REP.

Here's the Command:
Код:
CMD:unban(playerid,params[])
{
	if(sscanf(params,"s[128]",params)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /unabn [player_name]");
	new file[40];
	format(file, sizeof(file), USER_FILE);
	if(fexist(file))
	{
		INI_ParseFile(file, "Banned" .bExtra = true, .extra = b);
		if(b == 1)
		{
			b = 0;

		}
	}
	return 1;
}
and the ban CMD:
Код:
CMD:ban(playerid, params[])
{
    new targetid, reason[24];
    if(sscanf(params, "us[24]", targetid, reason)) return SendClientMessage(playerid, RED, "[USAGE]: /ban [name/id] [reason]");
    if(strlen(reason) < 1 || strlen(reason) > 24) return SendClientMessage(playerid, RED, "Your reason can only contain 1-24 characters.");
    if(PlayerInfo[playerid][aLevel] < 2) return SendClientMessage(playerid, RED, "Only admin level 2+ can use this command.");
    if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "Player not found.");
    if(PlayerInfo[targetid][aLevel] >= 8) return SendClientMessage(playerid, RED, "You cant ban admins.");
    if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, RED, "You cant ban Elvis.");
    {
        PlayerInfo[targetid][Banned] = 1;
        format(fstr, sizeof(fstr), "Admin %s [%d] has banned %s [%d] from NVCNR - Reason: %s", GetName(playerid), playerid, GetName(targetid), targetid, reason);
        SendClientMessageToAll(RED, fstr);
        GameTextForPlayer(targetid, "~r~Banned", 5000, 5);
        format(fstr2, sizeof(fstr2), "You have been banned from NVCNR. You were banned by admin %s.", GetName(playerid));
        SendClientMessage(targetid, RED, fstr2);
        SendClientMessage(targetid, ORANGE, "If you think this ban is unfair post an appeal at www.nvcnr.net");

        for(new h = 0; h < MAX_HOUSES; h++)
        {
            if(!strcmp(GetHouseOwner(h), GetName(targetid), false))
            {
                SellHouse(h);
            }
        }
        for(new b = 0; b < MAX_BUSINESSES; b++)
        {
            if(!strcmp(BizInfo[b][bOwner], GetName(targetid), false))
            {
                SellBiz(b);
            }
        }

        UnloadPlayerVehicles(targetid);
        RemoveOwnedVehs(targetid);

        BanEx(targetid, fstr);
    }
    return true;
ERRORS:
}
Код:
C:\Documents and Settings\Haseeb\Desktop\NVCNRS\gamemodes\NVCNR.pwn(23637) : error 017: undefined symbol "COLOR_WHITE"
C:\Documents and Settings\Haseeb\Desktop\NVCNRS\gamemodes\NVCNR.pwn(23642) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\Haseeb\Desktop\NVCNRS\gamemodes\NVCNR.pwn(23642) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Haseeb\Desktop\NVCNRS\gamemodes\NVCNR.pwn(23642) : error 017: undefined symbol "bExtra"
C:\Documents and Settings\Haseeb\Desktop\NVCNRS\gamemodes\NVCNR.pwn(23642) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
Need Seriously Help - by VillainPRO - 25.12.2013, 18:08
Re: Need Seriously Help - by FahadKing07 - 25.12.2013, 18:20
Re: Need Seriously Help - by SplinteX - 25.12.2013, 18:28
Re: Need Seriously Help - by VillainPRO - 25.12.2013, 19:02
Re: Need Seriously Help - by FahadKing07 - 25.12.2013, 19:26

Forum Jump:


Users browsing this thread: 1 Guest(s)