about putting players in virtual world -
Sfinx_17 - 11.11.2009
how to make a command when somewone type /duel 1 /duel 2 /duel 3 etc...to appear in a virtual world? plz help
Re: about putting players in virtual world -
Doppeyy - 11.11.2009
pawn Код:
SetPlayerVirtualWorld(playerid,(id of world));
/Artix
Re: about putting players in virtual world -
boelie - 11.11.2009
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
Re: about putting players in virtual world -
Sfinx_17 - 11.11.2009
ok but how to make my own virtual world?
Re: about putting players in virtual world -
smoker08 - 11.11.2009
Quote:
Originally Posted by Sfinx_17
ok but how to make my own virtual world?
|
uh

just use the virtual ids
Re: about putting players in virtual world -
Sfinx_17 - 11.11.2009
i mean when somebody type "/duel 1" for example to appear in LS on that big high block for example....? plz help
Re: about putting players in virtual world -
radhakr - 11.11.2009
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.
Re: about putting players in virtual world -
Sfinx_17 - 12.11.2009
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;
}
Re: about putting players in virtual world -
radhakr - 12.11.2009
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.
Re: about putting players in virtual world -
Sfinx_17 - 12.11.2009
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