30.12.2013, 12:34
pawn Код:
CMD:getall(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0; //have to be logged into rcon
new Float:X, Float:Y, Float:Z; // define the X. Y, Z which are used to store floats.
GetPlayerPos(playerid, X, Y, Z); //get the position of the admin
for(new i = 0; i <MAX_PLAYERS; i++) //we do a loop to go through every playerid
{
if(IsPlayerConnected(i)) //only perform if the player is connected
{
SetPlayerPos(i, X, Y, Z);//set the player's position to the admin
SendClientMessage(i, -1, "Teleported to admin."); //send a message to everyone telling them they've been teleported
}
}
}

