Spawn immediatly after connection
#1

Hey!

I would like to know how to spawn a player immediatly after he connected. No command for /spawn, no login or register just when you connect you spawn.

THank you
Reply
#2

Код:
OnPlayerConnect(playerid)
{
  SpawnPlayer(playerid);
}
"This forum requires that you wait 120 seconds between posts. Please try again in 60 seconds."
"This forum requires that you wait 120 seconds between posts. Please try again in 30 seconds."
"This forum requires that you wait 120 seconds between posts. Please try again in 15 seconds."
man this sux....
Reply
#3

^^ thank you
Reply
#4

Hm... I took a new script to test it but it does not work... What I have to do to spawn ? I didn't load any FS
Reply
#5

hm..
try to move the code I wrote to
"public OnPlayerRequestClass(playerid, classid)"

then it should work :P...
Reply
#6

Quote:
Originally Posted by Sascha
Посмотреть сообщение
hm..
try to move the code I wrote to
"public OnPlayerRequestClass(playerid, classid)"

then it should work :P...
like:

Код:
OnPlayerRequestClass(playerid, classid)
{
  SpawnPlayer(playerid);
}
just to make it more clear ^.^
Reply
#7

Thank you for your helpful detail Jantjuh but it still not work. Remember I took a new script to do it. Maybe there's a problem with it?

Thank you both of you
Reply
#8

normally there should be any problem with a new script...
hm...I guess it's because the "game" is still loading or so..
maybe try it with a timer which spawns the player after something like 5-10 seconds after connecting (maybe longer... find out how much time is between the "connected" and the loading of the class selection and make the timer 5 seconds or so longer..)
Reply
#9

Yeah maybe...so...How I can add a timer before automatic spawn?? ^^
Reply
#10

Код:
forward AutoSpawn(playerid);

public OnPlayerConnect(playerid)
{
  SetTimerEx("AutoSpawn", 20000, false, "i", playerid); //20 seconds - change the time if necessary
  return 1;
}

public AutoSpawn(playerid)
{
  SpawnPlayer(playerid);
  return 1;
}
Reply
#11

Okay thank you it work but players are always able to click on spawn button ... Ho to delete it? please I think it's my last question ^^
Reply
#12

Thank it works! But ^^ there is still the "spawn" button. How can I delete it to prevent player to use it?
Reply
#13

Quote:
Originally Posted by Amator
Посмотреть сообщение
Thank it works! But ^^ there is still the "spawn" button. How can I delete it to prevent player to use it?
Ho sorry for triple
Reply
#14

You can't remove |Spawn| and |<<| |>>| buttons.
Reply
#15

Okay thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)