Timer + Next Map? -
nicholas1 - 28.10.2012
I am having trouble.I am donna make another zombie map I only have 1 so far.Anyway,I was wondering for the next map how do I do a timer once it ends.The next map shows up and it do that 1?
Re: Timer + Next Map? -
Lordzy - 28.10.2012
You could use the SetTimer function at OnGameModeInit() and when the timer ends, set player's position to some other place(I haven't done derby before).
Example:
pawn Code:
public OnGameModeInit()
{
SetTimer("MapChange",900000,false); //We've set a 15 minute timer.
return 1;
}
forward MapChange();
public MapChange() //After 15 mins.
{
for(new i; i< MAX_PLAYERS; i++) //Looping through players.
{
if(IsPlayerConnected(i)) //After looping, we're choosing connected players.
{
SetPlayerPos(i,yourposX,yourposY,yourposZ); //Setting all the connected player's position. You've to set the pos.
}
}
return 1;
}
//Just an example.
.
Re: Timer + Next Map? -
nicholas1 - 28.10.2012
Thanks also for this
for(new i; i< MAX_PLAYERS; i++) //Looping through players.
{
if(IsPlayerConnected(i)) //After looping, we're choosing connected players. - for this they will select 2 teams for them right because its humans and zombies?
{
SetPlayerPos(i,yourposX,yourposY,yourposZ); //Setting all the connected player's position. You've - for this I am donna do 2 positions 1 for humans and other for zombies
Also for yourposX. it is having an error undefinied symbol
Re: Timer + Next Map? -
doreto - 28.10.2012
Quote:
Originally Posted by nicholas1
Thanks also for this
for(new i; i< MAX_PLAYERS; i++) //Looping through players.
{
if(IsPlayerConnected(i)) //After looping, we're choosing connected players. - for this they will select 2 teams for them right because its humans and zombies?
{
SetPlayerPos(i,yourposX,yourposY,yourposZ); //Setting all the connected player's position. You've - for this I am donna do 2 positions 1 for humans and other for zombies
Also for yourposX. it is having an error undefinied symbol
|
You havent define them also position is float thats why we define them us float
,.....
pawn Code:
public MapChange() //After 15 mins.
{
new Float:x,Float:y,Float:z
for(new i; i< MAX_PLAYERS; i++) //Looping through players.
{
if(IsPlayerConnected(i)) //After looping, we're choosing connected players.
{
SetPlayerPos(i,x,y,z); //Setting all the connected player's position. You've to set the pos.
}
}
return 1;
}
Re: Timer + Next Map? -
nicholas1 - 28.10.2012
Ok I have did it
forward MapChange();
public MapChange() //After 15 mins.
{
new Float
,Float:y,Float:z
for(new i; i< MAX_PLAYERS; i++) //Looping through players.
{
if(IsPlayerConnected(i)) //After looping, we're choosing connected players.
{
SetPlayerPos(i,x,y,z); //Setting all the connected player's position. You've to set the pos.
}
}
return 1;
}
But, error 001: expected token: ";", but found "for"
Re: Timer + Next Map? -
arvifilter - 28.10.2012
simply add ";" at the end of the line you defined the floats:
Code:
new Float:x,Float:y,Float:z;
Re: Timer + Next Map? -
nicholas1 - 28.10.2012
Thanks
Also,how do I select the pos.