I need few thang's
#6

Quote:
Originally Posted by czel
Посмотреть сообщение
You can make a command to stop reports by doing something like this:

Using a bool we would have this some where in the script:

pawn Код:
new bool:AllowReports = true;
And then here we would toggle it:

pawn Код:
COMMAND:togglereports(playerid, params[])
{
    // Put your admin check here

    if(AllowReports == true)
    {
        AllowReports = false;
        SendClientMessageToAll(COLOR_RED, "Reports are now disabled");
        return 1;
    }
   
    AllowReports = true;
    SendClientMessageToAll(COLOR_RED, "Reports are now enabled");
    return 1;
}
Then inside the report command:

pawn Код:
COMMAND:report(playerid, params[])
{
    // Put this check at the start
   
    if(AllowReports == false)
    {
        return SendClientMessage(playerid, COLOR_RED, "Reports are currently disabled.");
    }
   
    // Rest of the report stuff here


There's error's man :



Код:
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30417) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30429) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30430) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30435) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30535) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30542) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30551) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(31762) : error 017: undefined symbol "AllowReports"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(31764) : error 017: undefined symbol "AllowReports"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(31764) : warning 215: expression has no effect
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(31769) : error 017: undefined symbol "AllowReports"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(31769) : warning 215: expression has no effect
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64274) : error 017: undefined symbol "AllowReports"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64278) : warning 209: function "cmd_report" should return a value
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64279) : error 010: invalid function or declaration
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64282) : error 010: invalid function or declaration
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64284) : error 010: invalid function or declaration
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64286) : error 021: symbol already defined: "SendClientMessageEx"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64287) : error 010: invalid function or declaration
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64290) : error 010: invalid function or declaration
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64292) : error 010: invalid function or declaration
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64293) : error 021: symbol already defined: "SendReportToQue"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64294) : error 021: symbol already defined: "SendClientMessageEx"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(64295) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


14 Errors.
Reply


Messages In This Thread
I need few thang's - by yarin0600 - 29.10.2012, 18:11
Re: I need few thang's - by cluckintucker - 29.10.2012, 18:22
Re: I need few thang's - by yarin0600 - 29.10.2012, 18:29
Re: I need few thang's - by czel - 29.10.2012, 18:58
Re: I need few thang's - by Glint - 29.10.2012, 19:16
Re: I need few thang's - by yarin0600 - 29.10.2012, 19:16
Re: I need few thang's - by czel - 29.10.2012, 19:21
Re: I need few thang's - by RedJohn - 29.10.2012, 19:21

Forum Jump:


Users browsing this thread: 2 Guest(s)