[AJUDA]CNN - 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]CNN (
/showthread.php?tid=145099)
[AJUDA]CNN -
angels182 - 30.04.2010
Eu queria q adm e o time drifter pudesse usar o /cnn os adm deu certo sу q qnd fiz para os drifter deu erro..
pawn Код:
if(strcmp(cmd, "/cnn", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1 && [pTeam] = 24)OBS: Coloquei tbm com || //[pTeam] = 24 Seria o id do time drifter
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cnn [cnn formatodotexto ~n~=NovaLinha ~r~=Vermelho ~g~=Verde ~b~=Azul ~w~=Branco ~y~=Amarelo]");
return 1;
}
format(string, sizeof(string), "~b~%s: ~w~%s",sendername,result);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GameTextForPlayer(i, string, 5000, 6);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
return 1;
}
}
return 1;
}
Re: [AJUDA]CNN -
Guilherme_Canani - 01.05.2010
pawn Код:
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfp[playerid][pTeam] == 24)
{
Re: [AJUDA]CNN -
andmeida10 - 01.05.2010
Poem assim:
pawn Код:
if(strcmp(cmd, "/cnn", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1 || [pTeam] = 24)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cnn [cnn formatodotexto ~n~=NovaLinha ~r~=Vermelho ~g~=Verde ~b~=Azul ~w~=Branco ~y~=Amarelo]");
return 1;
}
format(string, sizeof(string), "~b~%s: ~w~%s",sendername,result);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GameTextForPlayer(i, string, 5000, 6);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
return 1;
}
}
return 1;
}
Re: [AJUDA]CNN -
angels182 - 01.05.2010
Nenhum deu certo
Re: [AJUDA]CNN -
TiagoPS - 07.05.2010
Tenta Ponhar Assim
Код:
if(strcmp(cmd, "/cnn", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1) || PlayerInfo[playerid][pTeam] == 24)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cnn [cnn formatodotexto ~n~=NovaLinha ~r~=Vermelho ~g~=Verde ~b~=Azul ~w~=Branco ~y~=Amarelo]");
return 1;
}
format(string, sizeof(string), "~b~%s: ~w~%s",sendername,result);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GameTextForPlayer(i, string, 5000, 6);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
return 1;
}
}
return 1;
}
OBS:Nao Testei
Re: [AJUDA]CNN -
NathanLive - 07.05.2010
Troca o PlayerInfo[playerid][pTeam] = 24 por:
PlayerInfo[playerid][pMembro] == 24 || PlayerInfo[playerid][pLider]== 24