Voila, merci de votre aide
if (strcmp(cmd, "/changenick", true)==0)
{
tmp = strtok(cmdtext, idx);
new string2[256];
if (gPlayerLogged[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GRAD1, " You Are Not Logged In");
return 1;
}
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /changename [newname]");
return 1;
}
format(string, sizeof(string), "%s.cer", tmp);
if(fexist(string))
{
SendClientMessage(playerid, COLOR_GRAD1, " That nick is registered");
return 1;
}
OnPlayerRename(tmp,string,playerid);
format(string, sizeof(string), "You may now reconnect with the name %s", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
GetPlayerName(playerid, playername, sizeof(playername));
format(string2, sizeof(string2), "%s.cer", playername);
printf("%s has changed there name to %s.", playername,tmp);
gPlayerLogged[playerid] = 0;
fremove(string2);
return 1;
}