27.05.2010, 15:06
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?
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);
}
}
}
}
new i; new vw; //virtual world for(i=0;i<MAX_PLAYERS;i++) { vw=GetPlayerVirtualWorld(i); if(vw==75) { SetPlayerVirtualWorld(i,0); } }
if(!strcmp(cmdtext,"/command",true)) { for(new i; i <MAX_PLAYERS; i++) { if(GetPlayerVirtualWorld(i) == 75) { SetPlayerVirtualWorld(i, 0); } } return 1; }
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); } } |
Originally Posted by DevilRP
Thanks guys!
|