07.12.2017, 17:23
PHP код:
if(strcmp(cmd, "/cnn", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new trampo[256];
strmid(trampo,cmdtext,4,strlen(cmdtext));
if (!strlen(trampo))
{
SendClientMessage(playerid, ERRO_L, "| ERRO | Digite: /cnn [texto]");
return 1;
}
if(IsPlayerConnected(playerid))
{
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
format(string, sizeof(string), "~r~# ~w~%s ~r~#", trampo);
GameTextForAll(string, 5000, 5);
}else{
SendClientMessage(playerid, ERRO_L, "| ERRO | Comando invбlido!");
}
}else{
SendClientMessage(playerid, ERRO_L, "| ERRO | Vocк tem que estar logado para usar este comando!");
}
return 1;
}
}