setting next map now working. - 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: setting next map now working. (
/showthread.php?tid=155004)
setting next map now working. -
iStarzz - 16.06.2010
My problem is: It keeps spawning at map 1... and setting it to map 2
pawn Код:
public OnPlayerSpawn(playerid)
{
IsAlive[playerid] = 1;
if(CWmap == 1)
{
SetPlayerInterior(playerid, interriormap1);
if(gTeam[playerid] == united_army)
{
SetPlayerTeam(playerid, united_army);
SetPlayerPos(playerid, uaspawnmap1);
}
else if(gTeam[playerid] == terrorists)
{
SetPlayerTeam(playerid, terrorists);
SetPlayerPos(playerid, terspawnmap1);
}
}
else if(CWmap == 2)
{
SetPlayerInterior(playerid, interriormap2);
if(gTeam[playerid] == united_army)
{
SetPlayerTeam(playerid, united_army);
SetPlayerPos(playerid, uaspawnmap2);
}
else if(gTeam[playerid] == terrorists)
{
SetPlayerTeam(playerid, terrorists);
SetPlayerPos(playerid, terspawnmap2);
}
}
return 1;
}
public SettingNext()
{
if(CWmap == 1) // Map 1
{
CWmap = 2;
for(new i = 0; i < MAX_PLAYERS; i++)
if(gTeam[i] == united_army)
{
SetPlayerPos(i, uaspawnmap2);
SetPlayerInterior(i, interriormap2);
TogglePlayerControllable(i, true);
}
else if(gTeam[i] == terrorists)
{
SetPlayerPos(i, terspawnmap2);
SetPlayerInterior(i, interriormap2);
TogglePlayerControllable(i, true);
}
else if(CWmap == 2) // Map 2
{
CWmap = 1;
if(gTeam[i] == united_army)
{
SetPlayerPos(i, uaspawnmap1);
SetPlayerInterior(i, interriormap1);
TogglePlayerControllable(i, true);
}
else if(gTeam[i] == terrorists)
{
SetPlayerPos(i, terspawnmap1);
SetPlayerInterior(i, interriormap1);
TogglePlayerControllable(i, true);
}
}
}
return 1;
}
Re: setting next map now working. -
MadeMan - 16.06.2010
pawn Код:
public SettingNext()
{
if(CWmap == 1) // Map 1
{
CWmap = 2;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == united_army)
{
SetPlayerPos(i, uaspawnmap2);
SetPlayerInterior(i, interriormap2);
TogglePlayerControllable(i, true);
}
else if(gTeam[i] == terrorists)
{
SetPlayerPos(i, terspawnmap2);
SetPlayerInterior(i, interriormap2);
TogglePlayerControllable(i, true);
}
}
}
else if(CWmap == 2) // Map 2
{
CWmap = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == united_army)
{
SetPlayerPos(i, uaspawnmap1);
SetPlayerInterior(i, interriormap1);
TogglePlayerControllable(i, true);
}
else if(gTeam[i] == terrorists)
{
SetPlayerPos(i, terspawnmap1);
SetPlayerInterior(i, interriormap1);
TogglePlayerControllable(i, true);
}
}
}
return 1;
}