Simple round changer, works perfectly but only for id 0
#1

Ok so ive created like a round changer for my cod gm which will change the map .etc but it only works for id 0 ive realized its the timers i think, ive used SetTimer when it should be SetTimerEx but i dont know how to edit it all with the new times for it all to work still so if someone could help me out it would be greatly appreciated.

http://pastebin.com/r9wQrDq7

I would really appreciate it if somebody can help
Reply
#2

Bump
Reply
#3

use for loop

for(new i; i < MAX_PLAYERS ; i++)
{


}

or use this tutorial
https://sampforum.blast.hk/showthread.php?tid=269336
Reply
#4

I do use loops
Reply
#5

Do you realise how poor that loop is initiated? BTW, that's not dynamic, it's a static map changing system lol. Kind of off-topic but when I first said to you, is your map system dynamic you said yes :O

Consider using foreach or use this:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) if( IsPlayerConnected( i ) )
                {
}
Reply
#6

Yeah I know I need to check if the player is connected that's something I need to add into the whole gm but initially I would like to get this working then I can make the relevant changes within the gm
Reply
#7

Dynamic means that the particular FS will work same as it will work in mine or your's. Its designed in such a way that it will work on every Server. Static needs us to set settings manually or change it according to the Usage!
Reply
#8

Yes I know that? All I need help with is fixing it so it just doesn't work for ID 0
Reply
#9

You are using
pawn Код:
SetTimer("SetupPlayerForPlaying", 60000, true);
Which is wrong way to call a timer for a specified player. Use this instead:
pawn Код:
SetTimerEx("SetupPlayerForPlaying", 60000, true, "d", i);
And put this inside the loop block, because whe need that "i", which we'll get from the "for" loop.
Reply
#10

Ok il try that when I get home
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)