Set all virtual world
#1

Hello people.

How do i set everyones virtual world to 0.

PHP код:
CMD:stopearthquake(playeridparams[])
{
  if(
IsPlayerAdmin(playerid))
  {
    
ShowPlayerDialog(playerid, -1DIALOG_STYLE_MSGBOX"Successfully stopped.""{00CC00}You have successfully stopped the earthquake\n{FF0000}WARNING: all the objects will be removed and everything will be back to normal.""OK""");
  }
  else
  {
    
SendClientMessage(playerid, -1"{FF0000}You're not rcon administrator");
  }
  return 
1;

P.S: If i set his virtual world to 0 so the objects that was in virtual world 2 will not be in 0 ?
Reply
#2

Make it your self

tip

pawn Код:
foreach(Player, i)
SetPlayerVirtualWorld(i, 0);
Reply
#3

Quote:
Originally Posted by Ryz
Посмотреть сообщение
Make it your self
wow...This is scripting help isn't it?
Reply
#4

Quote:
Originally Posted by Stuun23
Посмотреть сообщение
wow...This is scripting help isn't it?
dude i mean use this 2 lines to do it simple!!

edit:

pawn Код:
CMD:stopearthquake(playerid, params[])
{
  if(IsPlayerAdmin(playerid))
  {
    ShowPlayerDialog(playerid, -1, DIALOG_STYLE_MSGBOX, "Successfully stopped.", "{00CC00}You have successfully stopped the earthquake\n{FF0000}WARNING: all the objects will be removed and everything will be back to normal.", "OK", "");
    foreach(Player, i)
    SetPlayerVirtualWorld(i, 0);
  }
  else
  {
    SendClientMessage(playerid, -1, "{FF0000}You're not rcon administrator");
  }
  return 1;
}
Reply
#5

You better have good reason to do this, changing VW's could have undesired results particularly if your not teleporting players just giving the heads up.
Reply
#6

I wanna set their worlds because it might remove the objects? will it ?
Reply
#7

Depends on what VW's the objects are set for as I said when setting VW's you better have good reason to do it.
Reply
#8

Hmm okay thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)