RemoveBuildingForPlayer and Change VirtualWorld Problem. - 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: RemoveBuildingForPlayer and Change VirtualWorld Problem. (
/showthread.php?tid=609890)
RemoveBuildingForPlayer and Change VirtualWorld Problem. -
Ult1mate - 17.06.2016
Hi.
RemoveBuildingForPlayer default world ID: 0 and can not be changed manually. How do i change
![Confused](images/smilies/confused.png)
e.g. (ID: 1,2,3 etc.) Please share your ideas.
I so tried something but it didn't work.
PHP код:
stock RemoveBuildingWorldPlayer()
{
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++){
if(!IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
new a;
if(SetPlayerVirtualWorld(i, a >= 1))
{
RemoveBuildingForPlayer(i, 16614, -346.6719, 1595.0781, 79.6641, 0.25);
RemoveBuildingForPlayer(i, 16613, -346.6719, 1595.0781, 79.6641, 0.25);
}}
return true;
}
Re: RemoveBuildingForPlayer and Change VirtualWorld Problem. -
Matz - 17.06.2016
So you want to remove buildings for a player who is not in the world 0 but another?
Re: RemoveBuildingForPlayer and Change VirtualWorld Problem. -
Ult1mate - 17.06.2016
Quote:
Originally Posted by Matz
So you want to remove buildings for a player who is not in the world 0 but another?
|
Thank you for comment.
Yes, first(World ID: 0) default virtual world undeleted RemoveBuilding showing players. Other virtual world(World ID: 1/2/3/4/5 etc.) should be RemoveBuilding deleted players.
for example:
World 0 not delete(show) Removebuildingforplayer function object.
World 1 delete Removebuildingforplayer function object.
Re: RemoveBuildingForPlayer and Change VirtualWorld Problem. -
Matz - 17.06.2016
Quote:
Originally Posted by Ult1mate
Thank you for comment.
Yes, first(World ID: 0) default virtual world undeleted RemoveBuilding showing players. Other virtual world(World ID: 1/2/3/4/5 etc.) should be RemoveBuilding deleted players.
for example:
World 0 not delete(show) Removebuildingforplayer function object.
World 1 delete Removebuildingforplayer function object.
|
According to what you said you must use a code something like this:
Код:
if(GetPlayerVirtualWorld(playerid) > 0)
{
RemoveBuildingForPlayer(...);
}
Re: RemoveBuildingForPlayer and Change VirtualWorld Problem. -
Ult1mate - 18.06.2016
Quote:
Originally Posted by Matz
According to what you said you must use a code something like this:
Код:
if(GetPlayerVirtualWorld(playerid) > 0)
{
RemoveBuildingForPlayer(...);
}
|
thank you sir !