DM zone with a "capture the..." idea -
Gemini - 11.09.2011
2 bases (2 teams), if for example a person from the blue team makes it too the flag/pickup of the other red team, then there will be message shown "... has captured the flag, the blue team has won!" and then the players will be teleported back to their bases.
Is there any FS that has this kind of idea already?
If not, then what functions/things do I need to script in order to make this DM?
Thanks
ps: Its not a DM server, so I am looking for a FS, not a GM.
Re: DM zone with a "capture the..." idea -
Dokins - 11.09.2011
pawn Код:
if(PlayerTeam == BLUE_TEAM) // Guessing the Blue team is defined as this
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z)) // Enter your X,Y,Z there of the flag.
{
SendClientMessage(playerid, COLOUR, "You have captured the flag, Your team wins);
SendClientMessageToAll(COLOUR, "Blue team has won!");
SetPlayerPos(playerid, X, Y, Z);
}
else if(PlayerTeam == RED_TEAM) // Guessing the Blue team is defined as this
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z)) // Enter your X,Y,Z there of the flag.
{
SendClientMessage(playerid, COLOUR, "You have captured the flag, Your team wins);
SendClientMessageToAll(COLOUR, "Red team has won!");
SetPlayerPos(playerid, X, Y, Z);
}
}
return 1;
}
Something similar to that should work.
Re: DM zone with a "capture the..." idea -
Sasino97 - 11.09.2011
Quote:
Originally Posted by Dokins
pawn Код:
if(PlayerTeam == BLUE_TEAM) // Guessing the Blue team is defined as this { if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z)) // Enter your X,Y,Z there of the flag. { SendClientMessage(playerid, COLOUR, "You have captured the flag, Your team wins); SendClientMessageToAll(COLOUR, "Blue team has won!"); SetPlayerPos(playerid, X, Y, Z); } else if(PlayerTeam == RED_TEAM) // Guessing the Blue team is defined as this { if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z)) // Enter your X,Y,Z there of the flag. { SendClientMessage(playerid, COLOUR, "You have captured the flag, Your team wins); SendClientMessageToAll(COLOUR, "Red team has won!"); SetPlayerPos(playerid, X, Y, Z); } } return 1; }
Something similar to that should work.
|
You forgot to close the two strings
Re: DM zone with a "capture the..." idea -
Gemini - 11.09.2011
How do I define the teams? Sorry if it's a nubby question :/
Re: DM zone with a "capture the..." idea -
Gemini - 12.09.2011
Anyone?
Re: DM zone with a "capture the..." idea -
HotPlayer - 12.09.2011
#define YourTeam 1
Re: DM zone with a "capture the..." idea -
Gemini - 12.09.2011
Doesn't work

I put
#define BLUE_TEAM 1 at the top of the script
Код:
if(PlayerTeam[playerid] == BLUE_TEAM) // Guessing the Blue team is defined as this
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, -840.6604, 1978.6160, 22.9245)) // Enter your X,Y,Z there of the flag.
{
SendClientMessage(playerid, COLOR_WHITE, "You have captured the flag, Your team wins");
SendClientMessageToAll(COLOR_WHITE, "Blue team has won!");
SetPlayerPos(playerid, -608.4156, 1830.7487, 7.0000);
return 1;
}
}
but it gives me this errors:
(41) : error 010: invalid function or declaration
(43) : error 010: invalid function or declaration
(48 ) : error 010: invalid function or declaration
all the errors should be in the above lines (code)
Re: DM zone with a "capture the..." idea -
iggy1 - 12.09.2011
https://sampwiki.blast.hk/wiki/PAWN_tutorial
There is lots of info there on how to create teams.
Re: DM zone with a "capture the..." idea -
rangerxxll - 12.09.2011
Example of two teams:
pawn Код:
#define TERRORISTS 0 //defines the terrorists as id 0 all sa-mp id's start at 0
#define MARINES 1 //defines the team Marines and the id of the team is
Re: DM zone with a "capture the..." idea -
Dokins - 12.09.2011
Quote:
Originally Posted by [GF]Sasino97
You forgot to close the two strings 
|
Oh yeah, I was doing the coding IN the post, I was expecting a few mistakes!
Thanks! :P