help teleport player
#3

This is going to teleport everyone on the server to Your position, virtual world and interior:

pawn Код:
new Interior[MAX_PLAYERS];
new VirtualWorld[MAX_PLAYERS];

CMD:getall(playerid, params[])
{
if(IsPlayerAdmin(playerid)) // Admins only
{
new Float:X, Float:Y, Float:Z;

Interior[playerid] = GetPlayerInterior(playerid);
VirtualWorld[playerid] = GetPlayerVirtualWorld(playerid);

GetPlayerPos(playerid, X, Y, Z);

for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerPos(i, X, Y, Z);
SetPlayerInterior(i,Interior[playerid]);
SetPlayerVirtualWorld(i,VirtualWorld[playerid]);

SendClientMessage(playerid, 0x00ADFFFF, "You've teleported everyone to Your position!");
// 0x00ADFFFF {00ADFF} = aqua blue colour
}
}
}
if(!IsPlayerAdmin(playerid)) // Not Admin
{
SendClientMessage(playerid, 0xE6000000, "You're not authorized to use this command!");
// 0xE6000000 {E60000} = red colour
}
return 1;
}

// Wan
Reply


Messages In This Thread
help teleport player - by 26_RUSSS - 30.12.2013, 12:28
Re: help teleport player - by Vykintas - 30.12.2013, 12:32
Re: help teleport player - by Wan - 30.12.2013, 12:32
Re: help teleport player - by Mattakil - 30.12.2013, 12:34

Forum Jump:


Users browsing this thread: 1 Guest(s)