J'ai cherché un petit peu, et je pense que j'ai la solution. Donc s'y j'ai bien compris, si la personne tape /inconnu sonmsg
Sa écrit : " Inconnu : sonmsg " Si c'est cela alors :
if(strcmp(cmd, "/inconnu", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
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, "SERVEUR: /inconnu [texte]");
return 1;
}
format(string, sizeof(string), "Inconnu : %s", result);
ProxDetector(50.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
}
return 1;
}