30.11.2012, 10:24
(
Последний раз редактировалось Infinity90; 30.11.2012 в 10:25.
Причина: add
)
pawn Код:
//Top of your script:
new Float:Posxx, Float:Posyy, Float:Poszz;
dcmd_spec(playerid, params[])
{
new id;
if (sscanf(params, "u", id)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /spec [ID]");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_GREY, "* Player[ID] is not found!");
else
if(PlayerInfo[playerid][pAdmin] >= 4)
{
GetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
GetPlayerPos(playerid,Posxx,Posyy,Poszz);
if(IsPlayerInAnyVehicle(id))
{
new int = GetPlayerInterior(id);
SetPlayerInterior(playerid, int);
TogglePlayerSpectating(playerid, 1);
PlayerSpectateVehicle(playerid, GetPlayerVehicleID(id));
}
else
{
new int = GetPlayerInterior(id);
SetPlayerInterior(playerid, int);
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, id);
}
}
return 1;
}
dcmd_specoff(playerid, params[])
{
#pragma unused params
TogglePlayerSpectating(playerid, 0);
Specing[playerid] = 0;
SetPlayerPos(playerid,Posxx,Posyy,Poszz);
return 1;
}