if(strcmp(cmd, "/cnn", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
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 formato ~n~=NovaLinha ~r~=Vermelho ~g~=Verde ~b~=Azul ~w~=Branco ~y~=Amarelo ~l~=Preto]");
return 1;
}
else
{
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, 3);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
return 1;
}
}
return 1;
}
if(strfind(Nome(playerid),"[ARE]Garotin_[R]",true) != -1
if(strcmp(cmd, "/cnn", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strfind(sendername,"Seu_Nome",true) != -1)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
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 formato ~n~=NovaLinha ~r~=Vermelho ~g~=Verde ~b~=Azul ~w~=Branco ~y~=Amarelo ~l~=Preto]");
return 1;
}
else
{
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, 3);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
return 1;
}
}
return 1;
}
coloca assim
PHP код:
Qualquer erro me avise |
if(strfind(sendername,"Seu_Nome",true) != -1)
if(strcmp(sendername, "Seu_Nome", false) == 0)
if(!strcmp(sendername, "Nick 1", false) || !strcmp(sendername, "Nick 2", false)) { // aqui o cуdigo que irб executar caso o nick do jogador for igual a um dos 2 acima definidos... }