teleport
#1

i was wondering if its possiable to have a auto teleport so every so long it teleports all players to a location
Reply
#2

u mean on player spawn , he teleports to somewhere?
________
IOLITE VAPORIZER
Reply
#3

No i what i mean is like a event teleport so say at every 30min past al players are teleport to a area for a DM match and after 10 min they are respawned at normal areas
Reply
#4

use SetTimer
________
Lukumi forum
Reply
#5

wil the time work for all players at once or will it start when they log on
Reply
#6

if u put it at ongamemodeinit , all will be teleported same time but if u put it on player spawn = different time
________
BUY E CIGARETTE
Reply
#7

btw i added u to my msn : virus_hesham@Hotmail.com
________
Lovely Wendie99
Reply
#8

Quote:
Originally Posted by [AC
Etch ]
if u put it at ongamemodeinit , all will be teleported same time but if u put it on player spawn = different time
SetTimer(Setplayerpostion, x, y ,z ,[timehere], true


SOmething like that i want but with 4 random spawns also wil this only spawn u there once or what
Reply
#9

idk how to make it random but i know how to make them go to 1 place

ongamemodeinit
Код:
SetTimer("teleport", 60000, true); //60000 = 1 minute in milli seconds
bottom of script :
Код:
forward teleport();
public tele()
{
SetPlayerPos(playerid,x,y,z);
return 1;
}
________
Smoking Cessation Forums
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)