Quote:
Originally Posted by [AF]Junior
Acho que й isso que vocк quer:
PHP код:
if(strcmp(cmd, "/cnn", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][Admin] >= 3)
{
new string[500];
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_RED, "USE: /cnn [texto]");
SendClientMessage(playerid, COLOR_WHITE, "~p~ (Roxo); ~r~ (Vermelho); ~b~ (Azul); ~g~ (Verde); ~b~ (Preto) e ~y~ (Amarelo).");
return 1;
}
format(string, sizeof(string), "~r~%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_RED, "Vocк nгo й Administrador!");
return 1;
}
}
return 1;
}
Onde tem o PlayerInfo[playerid][Admin] >= 3 vocк muda pra variбvel de admin que vocк usa.
Crйditos: Thug Life City RPG e Eu que modifiquei o comando.
|
Код:
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\CityFurious.pwn(3913) : error 017: undefined symbol "cmd"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\CityFurious.pwn(3917) : error 017: undefined symbol "PlayerInfo"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\CityFurious.pwn(3917) : warning 215: expression has no effect
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\CityFurious.pwn(3917) : error 001: expected token: ";", but found "]"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\CityFurious.pwn(3917) : error 029: invalid expression, assumed zero
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\CityFurious.pwn(3917) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
No meu deu esses Erros!
e o meu й Samp 0.3c e nao й o Thug Life! me ajudem ae!