Spawning in one place.. - 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: Spawning in one place.. (
/showthread.php?tid=348034)
Spawning in one place.. -
Elysian` - 03.06.2012
Ok, So I tried spawning in 2 different places but it spawns both teams in one spot!
(NOTE: using "ForceClassSelection(playerid);" when they connect(using a dialog to select team also) causes them to spawn in blueberry)
OnPlayerSpawn:
pawn Код:
switch(CurrentMap)
{
case 0:// Map 1
{
if(gTeam[playerid] == Swat) {//Team 1 functions
SetPlayerColor(playerid, COLOR_PURPLE);
SetPlayerPos(playerid, -1294.2490,2570.6985,85.7764);//Set the postion for the players for map 1
SetPlayerFacingAngle(playerid, 182.3150);//Set facing angle of players for map 1
SetPlayerInterior(playerid, 0);
}
if(gTeam[playerid] == Terro) {//Team 2 functin
SetPlayerColor(playerid, COLOR_RED);
SetPlayerPos(playerid, -1304.9689,2464.9429,87.7562);//Set the postion for the players for map 1
SetPlayerFacingAngle(playerid, 359.8622);//Set facing angle of players for map 1
SetPlayerInterior(playerid, 0);
}
}
}
Dialog_Team:
pawn Код:
case DIALOG_TEAM:
{
if(response)
{
switch(listitem)
{
case 0:
{
TogglePlayerSpectating(playerid, 0);
SetPlayerTeam(playerid, 1);
SendClientMessage(playerid, COLOR_GREY, "|- Objective: Eliminate all Terrorists -|");
SetPlayerToSpawn(playerid);
}
case 1:
{
TogglePlayerSpectating(playerid, 0);
SetPlayerTeam(playerid, 2);
SendClientMessage(playerid, COLOR_GREY, "|- Objective: Eliminate all S.W.A.T before they destroy your operation! -|");
SetPlayerToSpawn(playerid);
}
}
}
}
Re: Spawning in one place.. -
TheDominator - 03.06.2012
I'm a bit of a noob at scripting but shouldn't there be something like
between the two dialog cases or OnPlayerSpawn?
Re: Spawning in one place.. -
Elysian` - 03.06.2012
Nope, because dialogs don't work like that.
But thanks for the help.
Re: Spawning in one place.. -
Elysian` - 03.06.2012
Anyone?
Re: Spawning in one place.. -
iGetty - 03.06.2012
You're using
pawn Код:
SetPlayerTeam(playerid, 2);
instead of
That's possibly the issue.
Re: Spawning in one place.. -
Elysian` - 04.06.2012
The SetPlayerTeam is for anti team kill..
(Get on MSN or Skype;3.)
Re: Spawning in one place.. -
Yuryfury - 04.06.2012
Yeah, so where do you set gTeam?