Set all virtual world - 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)
+--- Thread: Set all virtual world (
/showthread.php?tid=550983)
Set all virtual world -
Glossy42O - 16.12.2014
Hello people.
How do i set everyones virtual world to 0.
PHP код:
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", "");
}
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 ?
Re: Set all virtual world -
Ryz - 16.12.2014
Make it your self
tip
pawn Код:
foreach(Player, i)
SetPlayerVirtualWorld(i, 0);
Re: Set all virtual world -
Glossy42O - 16.12.2014
Quote:
Originally Posted by Ryz
Make it your self
|
wow...This is scripting help isn't it?
Re: Set all virtual world -
Ryz - 16.12.2014
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;
}
Re: Set all virtual world -
Pottus - 16.12.2014
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.
Re: Set all virtual world -
Glossy42O - 16.12.2014
I wanna set their worlds because it might remove the objects? will it ?
Re: Set all virtual world -
Pottus - 16.12.2014
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.
Re: Set all virtual world -
Glossy42O - 16.12.2014
Hmm okay thanks.