02.02.2015, 15:27
I want to teleport all players but I didn t find comand for that. Can somebody tell me which is?
SetPos(Float: X, Float: Y, Float: Z) {
for(new i; i != MAX_PLAYERS; ++i) {
SetPlayerPos(i, X, Y, Z);
}
}
#include <a_samp>
#include <zcmd>
CMD:getall(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 4)
{
SendCommandToAdmins(playerid,"GetAll");
new Float:x,Float:y,Float:z, interior = GetPlayerInterior(playerid);
GetPlayerPos(playerid,x,y,z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && (i != playerid) && i != ServerInfo[MaxAdminLevel])
{
PlayerPlaySound(i,1057,0.0,0.0,0.0);
SetPlayerPos(i,x+(playerid/4)+1,y+(playerid/4),z);
SetPlayerInterior(i,interior);
}
}
new string[128];
format(string,sizeof(string),"|- Administrator \"%s\" has Teleported all players -|", pName(playerid));
return SendClientMessageToAll(blue, string);
}
else return ErrorMessages(playerid, 5);
}