format(str5,sizeof(str5),"~y~IP:~w~ %s~n~~y~ID:~w~ %d~n~~y~Nick:~w~ %s~n~~y~Vida:~w~ %.1f~n~~y~Colete:~w~ %.1f~n~~y~Dinheiro:~w~ R$%d~n~~y~Velocidade:~w~ %d~n~~y~Arma:~w~ %s~n~~y~Municao:~w~ %d~n~~y~Ping:~w~ %d",
plrIP,
targetid,
PlayerName(targetid),
health,
plrarmour,
cash,
GetPlayerSpeed(targetid, true),
public Spectator()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Spectate[i] < 253 && Spectate[i] != 255)
{
SetPlayerToTeamColor(i);
new str5[256];
new armatext[30];
new arma;
new plrIP[16];
new municao;
new plrping;
new smunicao;
new targetid = Spectate[i];
if(IsPlayerConnected(targetid))
{
TogglePlayerSpectating(i, 1);
if(PlayerInfo[i][pAdmin] >= 1)
{
new Float:health;
new Float:plrarmour;
GetPlayerHealth(targetid, health);
GetPlayerArmour(targetid, plrarmour);
arma = GetPlayerWeapon(targetid);
plrping = GetPlayerPing(targetid);
municao = GetPlayerAmmo(targetid);
GetPlayerIp(targetid, plrIP, sizeof(plrIP));
new cash = GetPlayerMoney(Spectate[i]);
if(arma == 38) { armatext = "Minigun"; }
else if(arma == 40) { armatext = "Detonador"; }
else if(arma == 36) { armatext = "Lança missil RPG"; }
else if(arma == 35) { armatext = "Lança missil"; }
else if(arma == 16) { armatext = "Granada"; }
else if(arma == 18) { armatext = "Coctel Molotov"; }
else if(arma == 22) { armatext = "Pistola de Duas mãos 9mm"; }
else if(arma == 26) { armatext = "Escopeta de Cano Serrado"; }
else if(arma == 27) { armatext = "Escopeta de Combate"; }
else if(arma == 28) { armatext = "Micro Uzi"; }
else if(arma == 32) { armatext = "Tec9"; }
else if(arma == 37) { armatext = "Lança Chamas"; }
else if(arma == 0) { armatext = "Desarmado"; }
else if(arma == 4) { armatext = "Faca"; }
else if(arma == 5) { armatext = "Bastão de Base Ball"; }
else if(arma == 9) { armatext = "Motoserra"; }
else if(arma == 14) { armatext = "Flores"; }
else if(arma == 17) { armatext = "Granada de Gas"; }
else if(arma == 23) { armatext = "Pistola com silênciador"; }
else if(arma == 16) { armatext = "Granada"; }
else if(arma == 24) { armatext = "Desert Eagle"; }
else if(arma == 25) { armatext = "ShotGun"; }
else if(arma == 29) { armatext = "MP5"; }
else if(arma == 30) { armatext = "AK-47"; }
else if(arma == 31) { armatext = "M4"; }
else if(arma == 33) { armatext = "Rifle"; }
else if(arma == 34) { armatext = "Rifle Sniper"; }
else if(arma == 41) { armatext = "Spray"; }
else if(arma == 42) { armatext = "Extintor"; }
else if(arma == 46) { armatext = "Paraquedas"; }
else { armatext = "Desconhecido"; }
if(municao == 65535)
{
smunicao = 0;
}
else
{
smunicao = municao;
}
format(str5,sizeof(str5),"~y~IP:~w~ %s~n~~y~ID:~w~ %d~n~~y~Nick:~w~ %s~n~~y~Vida:~w~ %.1f~n~~y~Colete:~w~ %.1f~n~~y~Dinheiro:~w~ R$%d~n~~y~Velocidade:~w~ %d~n~~y~Arma:~w~ %s~n~~y~Municao:~w~ %d~n~~y~Ping:~w~ %d",
plrIP,
targetid,
PlayerName(targetid),
health,
plrarmour,
cash,
GetPlayerSpeed(targetid, true),
armatext,
smunicao,
plrping);
TextDrawSetString(gpss[i], str5);
TextDrawShowForPlayer(i, gpss[i]);
}
if(IsPlayerInAnyVehicle(targetid))
{
new carid = GetPlayerVehicleID(targetid);
PlayerSpectateVehicle(i, carid);
}
else
{
PlayerSpectatePlayer(i, targetid);
}
if(GetPlayerInterior(targetid) == 0)
{
SetPlayerInterior(i,0);
}
else if(GetPlayerInterior(targetid) > 0)
{
SetPlayerInterior(i,GetPlayerInterior(targetid));
}
}//Targetid connected
}
if(Spectate[i] == 253)
{
Controle(i, 1);
TogglePlayerSpectating(i, 0);
SetPlayerInterior(i,Unspec[i][sPint]);
PlayerInfo[i][pInt] = Unspec[i][sPint];
PlayerInfo[i][pLocal] = Unspec[i][sLocal];
Unspec[i][sLocal] = 255;
SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pSkin], Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]-1.0, 1.0, -1, -1, -1, -1, -1, -1);
gTeam[i] = PlayerInfo[i][pTeam];
SetPlayerToTeamColor(i);
MedicBill[i] = 0;
if(PlayerInfo[i][pVip] > 0)
{
SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pSkin], Unspec[i][Coords][0], Unspec[i][Coords][1], Unspec[i][Coords][2], 10.0, -1, -1, -1, -1, -1, -1);
SpawnPlayer(i);
SetCameraBehindPlayer(i);
}
else
{
SpawnPlayer(i);
}
Spectate[i] = 255;
}
if(Spectate[i] == 254)
{
Controle(i, 1);
SetPlayerInterior(i,Unspec[i][sPint]);
PlayerInfo[i][pInt] = Unspec[i][sPint];
PlayerInfo[i][pLocal] = Unspec[i][sLocal];
XXAirBreak[i] += 3;SetPlayerPos(i, Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]);
Spectate[i] = 255;
}
if(Spectate[i] == 256)
{
SetPlayerToTeamColor(i);
Spectate[i] = 255;
}
if(Spectate[i] == 257)
{
Spectate[i] = 254;
}
}
}
}
format(str5,sizeof(str5),"~y~IP:~w~ %s~n~~y~ID:~w~ %d~n~~y~Nick:~w~ %s~n~~y~Vida:~w~ %.1f~n~~y~Colete:~w~ %.1f~n~~y~Dinheiro:~w~ R$%d~n~~y~Velocidade:~w~ %d~n~~y~Arma:~w~ %s~n~~y~Municao:~w~ %d~n~~y~Ping:~w~ %d",
plrIP,
targetid,
PlayerName(targetid),
health,
plrarmour,
cash,
GetPlayerSpeed(targetid, true));
new velocidade;
velocidade = GetPlayerSpeed(targetid, true);
format(str5,sizeof(str5),"~y~IP:~w~ %s~n~~y~ID:~w~ %d~n~~y~Nick:~w~ %s~n~~y~Vida:~w~ %.1f~n~~y~Colete:~w~ %.1f~n~~y~Dinheiro:~w~ R$%d~n~~y~Velocidade:~w~ %d~n~~y~Arma:~w~ %s~n~~y~Municao:~w~ %d~n~~y~Ping:~w~ %d",
plrIP,
targetid,
PlayerName(targetid),
health,
plrarmour,
cash,
velocidade,
armatext,
smunicao,
plrping);
TextDrawSetString(gpss[i], str5);
TextDrawShowForPlayer(i, gpss[i]);
pawn Код:
@Edit pawn Код:
|
Posta somente as linhas que ta dando os avisos, fica mais fбcil pra ajudar.
|
format(stringxota,sizeof(stringxota),"~y~IP:~w~ %s~n~~y~ID:~w~ %d~n~~y~Nick:~w~ %s~n~~y~Vida:~w~ %.1f~n~~y~Colete:~w~ %.1f~n~~y~Dinheiro:~w~ R$%d~n~~y~Velocidade:~w~ %d~n~~y~Arma:~w~ %s~n~~y~Municao:~w~ %d~n~~y~Ping:~w~ %d", plrIP, targetid, PlayerName(targetid), health, plrarmour, cash, velocidade, armatext, smunicao, plrping);
format(stringxota,sizeof(stringxota),"~y~IP:~w~ %s~n~~y~ID:~w~ %d~n~~y~Nick:~w~ %s~n~~y~Vida:~w~ %.1f~n~~y~Colete:~w~ %.1f~n~~y~Dinheiro:~w~ R$%d~n~~y~Velocidade:~w~ %d~n~~y~Arma:~w~ %s~n~~y~Municao:~w~ %d~n~~y~Ping:~w~ %d", plrIP, targetid, PlayerName(targetid), Float:health, plrarmour, cash, velocidade, armatext, smunicao, plrping);