[Ajuda] Sistema /tv - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Sistema /tv (
/showthread.php?tid=579563)
Sistema /tv -
JuniorTheDM - 28.06.2015
PHP код:
CMD:tv(playerid, spect, params[])
{
new
id,
bool:gSpecting[MAX_PLAYERS];
if(sscanf(params, "u",id))
return SendClientMessage(id,-1,"Use: /tv [id]");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID)
return SendClientMessage(id, -1, "Este jogador nгo estб conectado");
if(!gSpecting[playerid])
{
new name[MAX_PLAYER_NAME],string[50];
GetPlayerName(id,name,MAX_PLAYER_NAME);
format(string,sizeof(string),"Vocк Esta de Tv Em %s.",name);
SendClientMessage(playerid,-1,string);
TogglePlayerSpectating(id, 1);
gSpectating[playerid] == true;
return 1;
}
else
{
TogglePlayerSpectating(id, 0);
gSpectating[playerid] == false;
SendClientMessage(id,-1,"Vocк nгo estб mais observando o player.");
return 1;
}
return 1;
}
PHP код:
C:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(172) : error 017: undefined symbol "gSpectating"
C:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(172) : warning 215: expression has no effect
C:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(172) : error 001: expected token: ";", but found "]"
C:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(172) : error 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(172) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Re: Sistema /tv -
SkullFire - 28.06.2015
Vocк declarou no inicio como gSpecting e nгo gSpectating.
Re: Sistema /tv -
iTakelot - 28.06.2015
Код:
CMD:tv(playerid, spect, params[])
{
new
id,
bool:gSpectating[MAX_PLAYERS]; //ERRO Aqui
if(sscanf(params, "u",id))
return SendClientMessage(id,-1,"Use: /tv [id]");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID)
return SendClientMessage(id, -1, "Este jogador nгo estб conectado");
if(!gSpectating[playerid])
{
new name[MAX_PLAYER_NAME],string[50];
GetPlayerName(id,name,MAX_PLAYER_NAME);
format(string,sizeof(string),"Vocк Esta de Tv Em %s.",name);
SendClientMessage(playerid,-1,string);
TogglePlayerSpectating(id, 1);
gSpectating[playerid] == true;
return 1;
}
else
{
TogglePlayerSpectating(id, 0);
gSpectating[playerid] == false;
SendClientMessage(id,-1,"Vocк nгo estб mais observando o player.");
return 1;
}
return 1;
}