02.07.2014, 04:14
I need /getall command for my admin system
CMD:getall(playerid, params[]) { for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); SetPlayerPos(i, pos[0], pos[1], pos[2]); } } return 1; }
CMD:getall(playerid, params[]) { for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && pInfo[playerid][pAdmin] >= 1) // Player looped is connected, and Level 1 admin. { new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); SetPlayerPos(i, pos[0], pos[1], pos[2]); } } return 1; }
CMD:getall(playerid, params[])
{
if(pInfo[playerid][pAdmin] < 1) return 1;
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
for(new i = GetMaxPlayers() - 1; i != -1; i--)
{
if(!IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
SetPlayerPos(i, pos[0], pos[1], pos[2]);
}
return 1;
}