About a 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: About a virtual world. (
/showthread.php?tid=150700)
About a virtual world. -
DevilRP - 27.05.2010
How can i make it so, lets say i type a command, and it will go through all the players in game and whoever is on a virtual world number 75 will be set to virtual world 0?
Re: About a virtual world. -
Anthony_Brassi - 27.05.2010
pawn Код:
if(strcmp(cmdtext,"/command",true) == 0)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new VW = GetPlayerVirtualWorld(i);
if(IsPlayerConnected(i))
{
if(VW == !0)
{
SetPlayerVirtualWorld(i,0);
}
}
}
}
untested but should work
Re: About a virtual world. -
DJDhan - 27.05.2010
Код:
new i;
new vw; //virtual world
for(i=0;i<MAX_PLAYERS;i++)
{
vw=GetPlayerVirtualWorld(i);
if(vw==75)
{
SetPlayerVirtualWorld(i,0);
}
}
Re: About a virtual world. - WackoX - 27.05.2010
Код:
if(!strcmp(cmdtext,"/command",true))
{
for(new i; i <MAX_PLAYERS; i++)
{
if(GetPlayerVirtualWorld(i) == 75)
{
SetPlayerVirtualWorld(i, 0);
}
}
return 1;
}
Re: About a virtual world. -
Anthony_Brassi - 27.05.2010
Quote:
Originally Posted by DJDhan
Код:
new i;
new vw; //virtual world
for(i=0;i<MAX_PLAYERS;i++)
{
vw=GetPlayerVirtualWorld(i);
if(vw==75)
{
SetPlayerVirtualWorld(i,0);
}
}
|
mine would work, and you should use new vw = GetPlayerVirtualWorld(i);, anyways either one would work, just his only works for VW 75 if you want it for any vw just do if(vw ==!0), my code has a few mistakes i just woke up and i did it quickly, btw Hey wacko, lol
Re: About a virtual world. -
DevilRP - 27.05.2010
Thanks guys!
Re: About a virtual world. -
Anthony_Brassi - 27.05.2010
Quote:
Originally Posted by DevilRP
Thanks guys!
|
no problemo, looks like you got plenty of examples