SA-MP Forums Archive
I need few thang's - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need few thang's (/showthread.php?tid=388615)



I need few thang's - yarin0600 - 29.10.2012

-Hey How can I do an command on my server to people can't do anymre /report , I eamn to take a break all the admin's to stop and no one can /report , Filter report's , To take a break and admin's can do an command that no one can report because admin stop that , Than I can to unfilter...


-And I want one more thang , to make an command of admin duty , epople can to see Admin's onduty / off duty in yellow color and all the server can see it... and one more command


Re: I need few thang's - cluckintucker - 29.10.2012

Well, I didnt understand your first question but on your second question for the /aduty heres what i came up with,
Код:
	CMD:aduty(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
	if(PlayerInfo[playerid][pAdminDuty] == 0)
{

		SendClientMessage(playerid, COLOR_GREEN, "You are now on administrative duty! Either anwser(/ar) or decline(/tr)reports. Do your job!");
		PlayerInfo[playerid][pAdminDuty] = 1;
		SetPlayerHealth(playerid, 100000);
		SetPlayerArmour(playerid, 100000);
		new string[128];
		format(string, sizeof(string), "Administrator %s is now on Admin Duty!(/report for more assistance)", GetPlayerNameEx(playerid));
		SendClientMessageToAllEx(COLOR_LIGHTBLUE, string);
}
else
{
			SendClientMessage(playerid, COLOR_RED, "You are now off admin duty!");
new string[128];
			format(string, sizeof(string), "Administrator %s is now off Admin Duty!(Do not report for him or her)", GetPlayerNameEx(playerid));
			SendClientMessageToAllEx(COLOR_RED, string);
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid, 50);
			PlayerInfo[playerid][pAdminDuty] = 0;
}
	return 1;
}
Just change the if(PlayerInfo[playerid][pAdmin] < 2) to what ever level you want it to be


Re: I need few thang's - yarin0600 - 29.10.2012

Made that and there's errors's



Код:
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30416) : error 017: undefined symbol "pAdminDuty"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30420) : error 017: undefined symbol "pAdminDuty"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30427) : 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(30431) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30435) : error 017: undefined symbol "pAdminDuty"
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30537) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30544) : warning 217: loose indentation
D:\Users\User\Downloads\Gamemode (3)\Gamemode\gamemodes\Model3.txt(30553) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: I need few thang's - czel - 29.10.2012

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



Re: I need few thang's - Glint - 29.10.2012




Re: I need few thang's - yarin0600 - 29.10.2012

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.



Re: I need few thang's - czel - 29.10.2012

Don't just copy and paste the stuff I wrote into your script. You need to edit the script with what I wrote down. From looking at your errors, the majority of your problems are from elsewhere in the script rather than the few lines that I gave you.


Re: I need few thang's - RedJohn - 29.10.2012

http://www.maplandia.com/vietnam/bin...t/tan-thang-1/

Well known place.