03.07.2015, 19:58
(
Последний раз редактировалось Sc0pion; 05.07.2015 в 07:24.
)
Fixed!
if(!EventOpen == 2) return SCM(playerid, -1 ,"Event has to be started in order to use this command");
if(strcmp(cmd, "/eventteleport", true) == 0)
{
if(AccInfo[playerid][LoggedIn] == 1 && AccInfo[playerid][Level] >=2)
{
new PlayerName[MAX_PLAYER_NAME], string[256];
new Float:x, Float:y, Float:z;
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
GetPlayerPos(playerid, x, y, z);
SendClientMessage(playerid, BlueMsg, "[ NOTIFICATION: You have teleported all event participants to your position. ]");
SendCommandToAdmins(playerid,"EventTeleport");
format(string,sizeof(string),"[ ADMIN: %s (Id: %d) has teleported every event participants to his/her position. ]",PlayerName,playerid);
SendClientMessageToAll(COLOR_PINK,string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerVirtualWorld(i)== 9999) //why are u checking this doe?
{
SetPlayerPos(i, x, y, z);
SetPlayerInterior(i, GetPlayerInterior(playerid));
}
}
return 1;
}
else SendClientMessage(playerid,red, "[ ERROR: You have entered an invalid command, please type /cmds to know the server's commands. ]");
}
}