about putting players in virtual world
#1

how to make a command when somewone type /duel 1 /duel 2 /duel 3 etc...to appear in a virtual world? plz help
Reply
#2

pawn Код:
SetPlayerVirtualWorld(playerid,(id of world));
/Artix
Reply
#3

yes..or you use SetPlayerInterior(playerid, 0); if you want to get out of the virtual world again you should do this under a '/return' command;

SetPlayerInterior(playerid, 0);


interior id's can be found here ; http://weedarr.wikidot.com/interior

for example; a 24/7 is interior id 17 so you should make SetPlayerInterior(playerid, 17); then
Reply
#4

ok but how to make my own virtual world?
Reply
#5

Quote:
Originally Posted by Sfinx_17
ok but how to make my own virtual world?
uh just use the virtual ids
Reply
#6

i mean when somebody type "/duel 1" for example to appear in LS on that big high block for example....? plz help
Reply
#7

The virtual worlds already exist, all you need to do is put someone in it. Just make "/duel1" like a normal teleport command but add SetPlayerVirtualWorld(playerid, worldid) in to it, where worldid is the number of the virtual world you would like to use (it can be anything from 1 to 2,147,483,647, but for simplicity's sake you should probably just use 1). When a player spawns the player's virtual world is set back to the default, 0.
Reply
#8

i allready put that code and btw this is my entire code what i choose from wiki

Код:
  if (strcmp(cmdtext, "/duel 1", true) == 0)
{
  SetPlayerVirtualWorld(playerid, 0);
  if(IsPlayerInAnyVehicle(playerid)) //If they are in a vehicle
  SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0); //Take the vehicle with them
  return 1;
}
Reply
#9

The default virtual world for someone to be in is 0, so assuming you haven't used SetPlayerVirtualWorld anywhere else in your script, SetPlayerVirtualWorld(playerid, 0); will not put the player in a different virtual world.
Reply
#10

ok now i tryed with id 0 of interior but why doesn't appear nothing in game?
doesn't appear also that "server unknown command" plz help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)