SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 10/07/2018, 10:56 AM   #1
TroS
Little Clucker
 
Join Date: May 2018
Posts: 40
Reputation: 1
Default Help!

Hello, I have created this thread for help.
I have a training server (I made it for a clan) and we train there for clanwars, but I don't have /Start rc command (There is /Start Arena or base command, but there isn't Rc, and rc is the most important thing for us).
I got a one but it didn't work because I didn't know how to call back.
If you got the command, please help me I need it.

PS: Sorry if it's a wrong section.
TroS is offline   Reply With Quote
Old 10/07/2018, 11:07 AM   #2
coool
Gangsta
 
Join Date: Feb 2013
Location: South Korea
Posts: 510
Reputation: 33
Default Re: Help!

what is rc?
__________________
coool is offline   Reply With Quote
Old 10/07/2018, 12:00 PM   #3
TroS
Little Clucker
 
Join Date: May 2018
Posts: 40
Reputation: 1
Default Re: Help!

RC Battlefield

Last edited by TroS; 11/07/2018 at 11:33 AM.
TroS is offline   Reply With Quote
Old 11/07/2018, 12:11 PM   #4
TroS
Little Clucker
 
Join Date: May 2018
Posts: 40
Reputation: 1
Default Re: Help!

Bump.
TroS is offline   Reply With Quote
Old 11/07/2018, 02:00 PM   #5
sabih
Little Clucker
 
Join Date: Jan 2017
Posts: 21
Reputation: 2
Default Re: Help!

download the filterscripts interior there is also rc battlefield and many other
sabih is offline   Reply With Quote
Old 11/07/2018, 02:55 PM   #6
TroS
Little Clucker
 
Join Date: May 2018
Posts: 40
Reputation: 1
Default Re: Help!

I would do that if I want.
But that's not my problem. I need a command, /start rc, you can find it in training servers.
Let me show you an example.
Code:
YCMD:start(playerid, params[], help)
{
	//if(Player[playerid][Level] < 1 && !IsPlayerAdmin(playerid)) return SendErrorMessage(playerid,"You need to be a higher admin level.");
	if(help)
	{
	    SendCommandHelpMessage(playerid, "start a round.");
	    return 1;
	}
	if(Current != -1) return SendErrorMessage(playerid,"A round is in progress, please wait for it to end.");
	if(AllowStartBase == false) return SendErrorMessage(playerid,"Please wait.");

	new Params[2][64], CommandID;
	sscanf(params, "ss", Params[0], Params[1]);

	if(isnull(Params[0]) || IsNumeric(Params[0])) return
	SendUsageMessage(playerid,"/start [base | arena | rc | last] [ID]");

	if(!strcmp(Params[0], "rc", true))
	{
	    AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base.
		SetTimer("OnRCStart", 2000, false);

		new iString[144];
		format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started RC Battlefield round (Interior: 72)", Player[playerid][Name]);
		SendClientMessageToAll(-1, iString);
	}
	else if(!strcmp(Params[0], "last", true))
	{
		if(ServerLastPlayed > -1 && ServerLastPlayedType > -1)
		{
		    if(ServerLastPlayedType == 1)
			{
				new BaseID = ServerLastPlayed;

				if(BaseID > MAX_BASES) return SendErrorMessage(playerid,"The last played base does not exist.");
				if(!BExist[BaseID]) return SendErrorMessage(playerid,"The last played base does not exist.");

				AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base.
				SetTimerEx("OnBaseStart", 2000, false, "i", BaseID);

                new iString[144];
				format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started the last played Base: {FFFFFF}%s (ID: %d)", Player[playerid][Name], BName[BaseID], BaseID);
				SendClientMessageToAll(-1, iString);

				GameType = BASE;
				goto skipped;

			}
			else if(ServerLastPlayedType == 0)
			{

				new ArenaID = ServerLastPlayed;

				if(ArenaID > MAX_ARENAS) return SendErrorMessage(playerid,"The last played arena does not exist.");
				if(!AExist[ArenaID]) return SendErrorMessage(playerid,"The last played arena does not exist.");

				GameType = ARENA;

				AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base.
				SetTimerEx("OnArenaStart", 2000, false, "i", ArenaID);

                new iString[144];
				format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started the last played Arena: {FFFFFF}%s (ID: %d)", Player[playerid][Name], AName[ArenaID], ArenaID);
				SendClientMessageToAll(-1, iString);
				goto skipped;
			}
		}
		else
		    return SendErrorMessage(playerid, "No bases/arenas have been played lately!");
	}
	else if(strcmp(Params[0], "base", true) == 0) CommandID = 1;
	else if(strcmp(Params[0], "arena", true) == 0) CommandID = 2;
	else return
	SendUsageMessage(playerid,"/start [base | arena | rc | last] [ID]");

	if(!IsNumeric(Params[1])) return SendErrorMessage(playerid,"Base/Arena ID can only be numerical.");

	if(CommandID == 1) {
		new BaseID = strval(Params[1]);

		if(BaseID > MAX_BASES) return SendErrorMessage(playerid,"That base does not exist.");
		if(!BExist[BaseID]) return SendErrorMessage(playerid,"That base does not exist.");

		AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base.
		SetTimerEx("OnBaseStart", 2000, false, "i", BaseID);

        new iString[144];
		format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started Base: {FFFFFF}%s (ID: %d)", Player[playerid][Name], BName[BaseID], BaseID);
		SendClientMessageToAll(-1, iString);

	} else if(CommandID == 2) {

		new ArenaID = strval(Params[1]);

		if(ArenaID > MAX_ARENAS) return SendErrorMessage(playerid,"That arena does not exist.");
		if(!AExist[ArenaID]) return SendErrorMessage(playerid,"That arena does not exist.");

		AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base.
		SetTimerEx("OnArenaStart", 2000, false, "i", ArenaID);

        new iString[144];
		format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started Arena: {FFFFFF}%s (ID: %d)", Player[playerid][Name], AName[ArenaID], ArenaID);
		SendClientMessageToAll(-1, iString);
	}
	skipped:

	foreach(new i : Player) {
	    if(CanPlay(i)) {
	        TogglePlayerControllable(i, 0); // Pause all the players.
			Player[i][ToAddInRound] = true;
		}
	}

	return 1;
}
It's an example, I don't want the other parts (arena & base), I want rc only.
Here is what does the command does (/Start rc): It starts a match between 2 teams (Alpha v Beta), with Combat - Deagle - M4, they keep fighting in the RC Map, when a team wins (Example: Alpha members killing Beta and winning the round) they spawn on the spawn place, with a dialog. And an admin starts the second round... there should be 9 rounds if the Match mode is enabled (/war command to enable it), if it's disabled, you can play as many rounds as you want without any limit. And the dmg you did in the round shows in a dialog (I have the dialog already), and there is a dialog who counts the dmg you have did in all the rounds.
It's simple, and most of the Training servers have the command, and you can join a one to see how is the /Start rc command.
About the example I sent, its owner used YCMD, and I don't know if that will work for me because I am not using YCMD, and I don't know the call backs. That's why I need your help at a new command with call backs.
P.S: I don't know if I'm allowed to say this or not, but you can pm me in Discord to show you some examples (Tell me if you want).
TroS is offline   Reply With Quote
Old 11/07/2018, 07:35 PM   #7
Sew_Sumi
Godfather
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,280
Reputation: 517
Default Re: Help!

I find it interesting you know the 24 hour bump rule, but yet don't know about the no requests rule, or the existence of the Looking for Scripter thread...
Sew_Sumi is offline   Reply With Quote
Old 11/07/2018, 07:53 PM   #8
TroS
Little Clucker
 
Join Date: May 2018
Posts: 40
Reputation: 1
Default Re: Help!

I do know it, but I found the script request thread #6 closed so I made it here, sorry.
I'm gonna post there, and close this thread.
Sorry once again.
TroS is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 07:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.