help needed for virtual world spawn plz
#1

hello, im asking for help again i have a problem with this script when i want to spawn in an area i do the command to tele and i can get there. but if someone else does the same command instead of sending them there it will respawn me im very new to scripting and cant c what im doing wrong...anyway here is the script.

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == AREA_CHOOSE)
	{
		if(response == 1)
		{
			TEAMarea[playerid] = 1;
			SetTimer("WARSPAWN",30000,0);
			SendClientMessage(playerid,blue,"You Have Choosen Airport You Will Spawn In Approx 30Secs ");
			SendClientMessage(playerid,blue,"You WILL Loose Your Money When You Enter/Leave The Area");
    }
    else
    {
      TEAMarea[playerid] = 2;
      SetTimer("WARSPAWN2",30000,0);
			SendClientMessage(playerid,blue,"You Have Choosen Area52 You Will Spawn In Approx 30secs");
			SendClientMessage(playerid,blue,"You WILL Loose Your Money When You Enter/Leave The Area");
 		}
		return 1;
	}
	return 0;
}
timers
Код:
public WARSPAWN(playerid)
{
  SetPlayerVirtualWorld(playerid,10);
  PutPlayerInVehicle(playerid,sparrow1,0);
  return 1;
}

public WARSPAWN2(playerid)
{
  SetPlayerVirtualWorld(playerid,10);
  SetPlayerPos(playerid,213.4090,1903.2786,17.6406);//area52
  SetPlayerFacingAngle(playerid,3.5565);
  return 1;
}
can anyone tell me why it only spawns 1 player?
i know its probably a stupid mistake but im crap lol
many thanks in advance



Reply
#2

i think i found fix but cant test yet i should have used
Код:
SetTimerEx("WARSPAWN",30000,false,"i",playerid);
if someone can confirm thats what i was doing wrong id be greatfull if not no worries will test tonight.
Reply
#3

try this
Код:
public WARSPAWN(playerid)
{
  for(new a; a<GetMaxPlayers(); a++) SetPlayerVirtualWorld(a,10);
  for(new b; b<GetMaxPlayers(); b++) PutPlayerInVehicle(b,sparrow1,0);
  return 1;
}

public WARSPAWN2(playerid)
{
  for(new c; c<GetMaxPlayers(); c++) SetPlayerVirtualWorld(c,10);
  for(new d; d<GetMaxPlayers(); d++) SetPlayerPos(d,213.4090,1903.2786,17.6406);//area52
  for(new e; e<GetMaxPlayers(); e++) SetPlayerFacingAngle(e,3.5565);
  return 1;
}
Reply
#4

thanks m8 ill give it a try l8r BTW that is a sick avatar
Reply
#5

lol this work??
Reply
#6

i cant test tll tonight m8 server is closed need at least two players to test
Reply
#7

i can come give me ip
Reply
#8

i appreciate it m8 but iits not my server and i havnt got permission to make this static ip someone else using connection too. thanks alot tho. if u play ur welcome on our server its closed untill june 1st but will be on hosted list too ill pm u the url as some might c it as advertising in scripting discusion.


EDIT: i added ur server to favs ill pop on l8r
Reply
#9

is italian server you dont understand nope XD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)