how to do this? zones -
TheDiscussionCafe - 13.05.2012
how i make zones? like "SanAndreasZones" zones like that. example: i want whenver player is in world 1 or world 2 the whole zone will show name like "world 1" or "world 2". how i can name SanAndreasZones by world?
Re: how to do this? zones -
Niko_boy - 13.05.2012
you mean VirtualWorld ?
wiki.sa-mp.com/wiki/SetPlayerVirtualWorld
Re: how to do this? zones -
ProdrifterX - 13.05.2012
pawn Код:
if (strcmp(cmdtext, "/world3", true) == 0)
{
SetPlayerVirtualWorld(playerid, 3);////this 3 want to say virtual world 3
return 1;
}
pawn Код:
if (strcmp(cmdtext, "/world4", true) == 0)
{
SetPlayerVirtualWorld(playerid, 4);////this 3 want to say virtual world 4, and you can edit it :)
return 1;
}
Re: how to do this? zones -
TheDiscussionCafe - 13.05.2012
hi guys i have command i just need wen i are in world 1 or world 2 it will show my location/zone for "World 1" or "World 2".
Re: how to do this? zones -
Jonny5 - 13.05.2012
use
https://sampwiki.blast.hk/wiki/GetPlayerVirtualWorld
to get the players world
the do a switch or if check and see if its world 1 or 2 ect...
and then use the zone code like normal inside the if
Re: how to do this? zones -
TheDiscussionCafe - 13.05.2012
sorry im noob. how i make inside if?
Re: how to do this? zones -
Jonny5 - 13.05.2012
i would go this route
pawn Код:
new pVW = GetPlayerVirtualWorld(playerid);
switch (pVW)
{
case 1,2: //<~~add your worlds here
{
//add your zone code here
//use zones for world 1 and 2
}
default:
{
//dont use zone code
}
}
Re: how to do this? zones -
TheDiscussionCafe - 13.05.2012
Quote:
Originally Posted by Jonny5
i would go this route
pawn Код:
new pVW = GetPlayerVirtualWorld(playerid); switch (pVW) { case 1,2: //<~~add your worlds here { //add your zone code here //use zones for world 1 and 2 } default: { //dont use zone code }
}
|
okay thank . i see case 1, 2 . but does case 1 means world 1? and if i want WHOLE world to be called something like i want whole world 1 to be called world 1 , how i do that?
Re: how to do this? zones -
Jonny5 - 13.05.2012
in this example pVW holds the players virtural world
so if their VW is 1 or 2 then you would use your zone code
i suggest you read here
https://sampwiki.blast.hk/wiki/Scripting_Basics
to understand how switch, if all that works
the second question i dont understand what you mean?
do you mean like a textdraw that says the worlds name?
you can use the same logic above for that also
just make a TD for each world and show the correct one
according to the world the player is in
Re: how to do this? zones -
TheDiscussionCafe - 13.05.2012
okay i kind of still dont get

sorry
pawn Код:
new pVW = GetPlayerVirtualWorld(playerid);
switch (pVW)
{
case 1: //<~~add your worlds here
{
//add your zone code here (idk what it mean)
//use zones for world 1 and 2 (idk what this mean)
}
default:
{
//where do i put here?
}
}