SA-MP Forums Archive
3 questions - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 3 questions (/showthread.php?tid=66484)



3 questions - Martin_Smith - 22.02.2009

Ok, i got 2 or 3 questions here:

(1)How do i make it so, from when the gamemode starts, there is 15 minutes, then the gamemode ends...Also have the time starting from 15:00 going down to 0:00 at the top of the screen

(2)Also, i have two Teams, Team1 and team2 , How do i make it so there must be Two people on team 2 for every one person on team1??

(3)How do i make it so you have to stay in a certain Area? and if u try to leave the area, you get Teleported back to your spawn


If yu can heplp, thankyou


Re: 3 questions - x-cutter - 22.02.2009

Quote:
Originally Posted by Martin_Smith
Ok, i got 2 or 3 questions here:

(1)How do i make it so, from when the gamemode starts, there is 15 minutes, then the gamemode ends...Also have the time starting from 15:00 going down to 0:00 at the top of the screen

(2)Also, i have two Teams, Team1 and team2 , How do i make it so there must be Two people on team 2 for every one person on team1??

(3)How do i make it so you have to stay in a certain Area? and if u try to leave the area, you get Teleported back to your spawn


If yu can heplp, thankyou
1 - Timers and textdraws / gametexts
2 - Variables to track down player teams
3 - maybe YSI's area system edit or use IsPlayerInArea


Re: 3 questions - Martin_Smith - 22.02.2009

hmm,

(1) oviously its timers, but what do i do with em

(2)

(3) What that


Re: 3 questions - x-cutter - 22.02.2009

Search for YSI (******'s Server Includes) in the showroom, you will see what I'm talking about


Re: 3 questions - Finn - 22.02.2009

1.

pawn Код:
public GameModeTime();
pawn Код:
new gamemodetime = 900;
pawn Код:
public OnGameModeInit()
{
  SetTimer("GameModeTime", 1000, true);
  return 1;
}
pawn Код:
public GameModeTime()
{
  if(gamemodetime <= 0) return SendRconCommand("gmx");
  new string[25]; format(string, sizeof(string), "GAMEMODE TIME LEFT: %d", gamemodetime);
  GameTextForAll(string, 1000, 4);
  gamemodetime--;
  return 1;
}
_________________________________________________

2.

pawn Код:
new teamamount[2];
This when the player is about to join team 2:
pawn Код:
if(teamamount[1] > (teamamount[0] * 2)) return SendClientMessage(playerid, COLOR_RED, "TEAM 2 IS FULL");
teamamount[1]++;
This when the player is about to join team 1:
pawn Код:
if((teamamount[0] * 2) > teamamount[1]) return SendClientMessage(playerid, COLOR_RED, "TEAM 1 IS FULL");
teamamount[0]++;
pawn Код:
teamamount[0]--; //When leaving the team 1
teamamount[1]--; //When leaving the team 2
3. Learn to script, I cba to help you anymore.