teleport
#10

SetTimer / Ex only calls public functions, so

pawn Код:
SetTimer("Event", 1000 * 60 * 30, true);
pawn Код:
forward Event();
public Event()
{
    switch(random(1)) //could be removed if <= 1
    {
        case 0:
        {
            for(new i; i < MAX_PLAYERS; i++)
            {
                switch(random(5)) //random(5) returns a number from 0 till 4 (0, 1, 2, 3 or 4)
                {
                    case 0: SetPlayerPos(i, 1.0, 2.0, 3.0);
                    case 1: SetPlayerPos(i, 2.0, 3.0, 4.0);
                    case 2: SetPlayerPos(i, 3.0, 4.0, 5.0);
                    case 3: SetPlayerPos(i, 4.0, 5.0, 1.0);
                    case 4: SetPlayerPos(i, 5.0, 1.0, 2.0);
                    default: print("ERROR: Undefined teleport!");
                }
            }
           
        }
        default: print("ERROR: Undefined event!");
    }  
}
Reply


Messages In This Thread
teleport - by 02manchestera - 05.03.2010, 20:55
Re: teleport - by aircombat - 05.03.2010, 21:06
Re: teleport - by 02manchestera - 05.03.2010, 21:19
Re: teleport - by aircombat - 05.03.2010, 21:21
Re: teleport - by 02manchestera - 05.03.2010, 21:30
Re: teleport - by aircombat - 05.03.2010, 21:44
Re: teleport - by aircombat - 05.03.2010, 21:45
Re: teleport - by 02manchestera - 05.03.2010, 21:51
Re: teleport - by aircombat - 05.03.2010, 21:56
Re: teleport - by Nero_3D - 05.03.2010, 22:05

Forum Jump:


Users browsing this thread: 1 Guest(s)