SA-MP Forums Archive
help needed for virtual world spawn plz - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help needed for virtual world spawn plz (/showthread.php?tid=147220)



help needed for virtual world spawn plz - iggy1 - 10.05.2010

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






Re: help needed for virtual world spawn plz - iggy1 - 11.05.2010

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.


Re: help needed for virtual world spawn plz - iJumbo - 11.05.2010

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;
}



Re: help needed for virtual world spawn plz - iggy1 - 11.05.2010

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


Re: help needed for virtual world spawn plz - iJumbo - 11.05.2010

lol this work??


Re: help needed for virtual world spawn plz - iggy1 - 11.05.2010

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


Re: help needed for virtual world spawn plz - iJumbo - 11.05.2010

i can come give me ip


Re: help needed for virtual world spawn plz - iggy1 - 11.05.2010

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


Re: help needed for virtual world spawn plz - iJumbo - 11.05.2010

is italian server you dont understand nope XD