korábban nem volt
a ladmin spec meg it van:
if(strcmp(cmd, \"/spec\", true) == 0) {
new specplayerid;
tmp = strtok(cmdtext, idx);
if(gTeam[playerid] == 2)
{
if(autospec==0)
{
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE,!\"USAGE: /specplayer [playerid]\");
return 1;
}
specplayerid = strval(tmp);
if(!IsPlayerConnected(specplayerid)) {
SendClientMessage(playerid, COLOR_RED,!\"specplayer: that player isn\'t active.\");
return 1;
}
StartSpectate(playerid, specplayerid);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF7F50AA,!\"HIBA: Autospec be van kapcsolva!\");
}
}
else
{
SendClientMessage(playerid, 0xFF7F50AA, !\"Ezt csak nézõk használhatják!\");
}
return 1;
}
// STOP SPECTATING
if(strcmp(cmd, \"/specoff\", true) == 0) {
if(gTeam[playerid] == 2)
{
if(autospec==0)
{
+ Csatolmányok és további opciók
gyorsbillenytûk: alt+s az elküldéshez/hozzászóláshoz vagy alt+p az elõnézethez
Téma összegzés
Írta: ɐʞzssǝlosz
« Dátum: Ma - 13:07:51 » Idézet beszúrása
StopSpectate(playerid);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF7F50AA, !\"HIBA: Autospec be van kapcsolva!\");
}
}
else
{
SendClientMessage(playerid, 0xFF7F50AA, !\"Ezt csak nézõk használhatják!\");
}
return 1;
}
if(!strcmp(cmdtext, \"/aspec-on\", true))
{
if(PlayerInfo[playerid][admins]==1||IsPlayerAdmin(playerid))
{
for (new s=0; s {
if (IsPlayerConnected(s))
{
if(gTeam==0||gTeam==1)
{
for (new i=0; i {
if (IsPlayerConnected(i))
{
if(gTeam==2)
{
StartSpectate(i,s);
}
}
}
}
}
}
SendClientMessageToAll(0x409FBFFF,\"{FF0000}[iNFÓ]:Autospec bekapcsolva!\");
autospec=1;
}
else
{
SendClientMessage(playerid, 0xFF7F50AA,!\"Te nem vagy admin!\");
}
return 1;
}
if(!strcmp(cmdtext, \"/aspec-off\", true))
{
if(PlayerInfo[playerid][admins]==1||IsPlayerAdmin(playerid))
{
for (new i=0; i {
if (IsPlayerConnected(i))
{
if(gTeam==2)
{
StopSpectate(i);
}
}
}
SendClientMessageToAll(0x409FBFFF,\"{FF0000}[iNFÓ]:Autospec kikapcsolva!\");
autospec=0;
}
else
{
SendClientMessage(playerid, 0xFF7F50AA,!\"Te nem vagy admin!\");
}
return 1;
}
forward ConnectedPlayers();
public ConnectedPlayers()
{
new Connected;
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) Connected++;
return Connected;
}
stock ReverseSpectate(playerid)
{
if(ConnectedPlayers() == 2) { StopSpectate(playerid); return 1; }
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && PlayerInfo[playerid][specID] != INVALID_PLAYER_ID)
{
for(new x=PlayerInfo[playerid][specID]-1; x>=0; x--)
{
if(x == 0) x = MAX_PLAYERS;
if(IsPlayerConnected(x) && x != playerid)
{
if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo- [specID] != INVALID_PLAYER_ID || (GetPlayerState(x) != 1 && GetPlayerState(x) != 2 && GetPlayerState(x) != 3))
{
continue;
}
else
{
StartSpectate(playerid, x);
break;
}
}
}
}
return 1;
}
stock StopSpectate(playerid)
{
TogglePlayerSpectating(playerid, 0);
PlayerInfo[playerid][specID] = INVALID_PLAYER_ID;
PlayerInfo[playerid][specType] = ADMIN_SPEC_TYPE_NONE;
GameTextForPlayer(playerid,\"~n~~n~~n~~w~Spectate mode ended\",1000,3);
return 1;
}
stock AdvanceSpectate(playerid)
{
if(ConnectedPlayers() == 2) { StopSpectate(playerid); return 1; }
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && PlayerInfo[playerid][specID] != INVALID_PLAYER_ID)
{
for(new x=PlayerInfo[playerid][specID]+1; x<=MAX_PLAYERS; x++)
{
if(x == MAX_PLAYERS) x = 0;
if(IsPlayerConnected(x) && x != playerid)
{
if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo- [specID] != INVALID_PLAYER_ID || (GetPlayerState(x) != 1 && GetPlayerState(x) != 2 && GetPlayerState(x) != 3))
{
continue;
}
else
{
StartSpectate(playerid, x);
break;
}
}
}
}
return 1;
}
stock StartSpectate(playerid,specplayerid)
{
for(new x=0; x if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo
AdvanceSpectate(x);
}
}
SetPlayerInterior(playerid,GetPlayerInterior(specplayerid));
TogglePlayerSpectating(playerid, 1);
if(IsPlayerInAnyVehicle(specplayerid)) {
PlayerSpectateVehicle(playerid, GetPlayerVehicleID(specplayerid));
PlayerInfo[playerid][specID] = specplayerid;
PlayerInfo[playerid][specType] = ADMIN_SPEC_TYPE_VEHICLE;
}
else {
PlayerSpectatePlayer(playerid, specplayerid);
PlayerInfo[playerid][specID] = specplayerid;
PlayerInfo[playerid][specType] = ADMIN_SPEC_TYPE_PLAYER;
}
new string[100], Float:hp, Float:ar;
GetPlayerName(specplayerid,string,sizeof(string));
GetPlayerHealth(specplayerid, hp); GetPlayerArmour(specplayerid, ar);
format(string,sizeof(string),\"~n~~n~~n~~n~~n~~n~~n~~n~~w~%s - id:%d~n~< sprint - jump >~n~hp:%0.1f ar:%0.1f $%d\", string,specplayerid,hp,ar,GetPlayerMoney(specplayerid) );
GameTextForPlayer(playerid,string,25000,3);
return 1;
}