if(strcmp(cmdtext, "/mudarnick", true) == 0){ new aname[MAX_PLAYER_NAME]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); format(file, sizeof(file), PASTA_CONTAS, aname); if(PlayerInfo[playerid][Logged] == 0){ SendClientMessage(playerid, Vermelho, " Vocк nгo estб logado(a)."); return 1; }
new bool:Liberado[MAX_PLAYERS];
// comando
if(Liberado[playerid] == false) return SendClientMessage(playerid, -1,"Vocк nгo estб liberado");
// comando para liberar
Liberado[playerid] = true;
if(strcmp(cmdtext, "/mudarnick", true) == 0)
{
new nick = strtok(cmdtext, idx);
if(!strlen(nick)) return SendClientMessage(playerid, Vermelho, "USO: /mudarnick [NOVO NICK]");
new str[100];
format(str, 100, "Seu novo nick й %s.", nick);
SendClientMessage(playerid, Vermelho, str);
SetPlayerName(playerid, nick);
if(PlayerInfo[playerid][Logged] == 0)
{
SendClientMessage(playerid, Vermelho, " Vocк nгo estб logado(a).");
return 1;
}
return 1;
}
if(strcmp(cmdtext, "/mudarnick", true) == 0)
{
new nick[MAX_PLAYER_NAME];
nick = strtok(cmdtext, idx);
if(!strlen(nick)) return SendClientMessage(playerid, -1, "USO: /mudarnick [NOVO NICK]");
new str[55];
format(str, sizeof(str), "Seu novo nick й %s.", nick);
SendClientMessage(playerid, -1, str);
SetPlayerName(playerid, nick);
if(PlayerInfo[playerid][Logged] == 0) return SendClientMessage(playerid, -1, " Vocк nгo estб logado(a).");
return 0x01;
}
pawn Код:
|
if(strcmp(cmdtext, "/mudarnick", true) == 0)
{
if(PlayerInfo[playerid][Logged] == 0) return SendClientMessage(playerid, -1, " Vocк nгo estб logado(a).");
new nick[MAX_PLAYER_NAME];
nick = strtok(cmdtext, idx);
if(!strlen(nick)) return SendClientMessage(playerid, -1, "USO: /mudarnick [NOVO NICK]");
new str[55];
format(str, sizeof(str), "Seu novo nick й %s.", nick);
SendClientMessage(playerid, -1, str);
SetPlayerName(playerid, nick);
return 0x01;
}