ко всем new
Код
new Float:TeleportDest[MAX_PLAYERS][3];
new Float:TelePos[MAX_PLAYERS][6];
кидаем туда где все команды
Код
if(strcmp(cmd, "/mark", true) == 0)
{
if (PlayerInfo[playerid] [pAdmin]>=2)
{
GetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
SendClientMessage(playerid, COLOR_GRAD2, "Точка телепортирования установлена.");
}
return 1;
}
if(strcmp(cmd, "/gotomark", true) == 0)
{
if (PlayerInfo[playerid] [pAdmin]>= 2)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
}
SendClientMessage(playerid, COLOR_GREEN, "Вы были телепортированы.");
SetPlayerInterior(playerid,0);
}
return 1;
}