Pas besoin de new dans ce cas :
else if (!strcmp(cmd, "/cp", true))
{
new Color[256];
/* On recupère la couleur choisie par le joueur */
Color = strtok(cmdtext, idx);
/* Si pas de couleur choisie */
if (!strlen(Color))
{
SendClientMessage(playerid, VERT, "USAGE: /cp [JAUNE,ROUGE,BLEU,VERT]");
return 1;
}
/* Selon la couleur choisie */
if (strcmp(COLOR, "jaune", true) == 0)
{
SetPlayerColor(playerid,0xFFFF00AA);
}
else if (strcmp(COLOR, "rouge", true) == 0)
{
SetPlayerColor(playerid,0xFF0000AA);
}
else if (strcmp(COLOR, "vert", true) == 0)
{
SetPlayerColor(playerid,0x00FF00AA);
}
else if (strcmp(COLOR, "bleu", true) == 0)
{
SetPlayerColor(playerid,0x0000FFAA);
}
SendClientMessage(playerid,MAUVE,"Couleur modifiée");
return 1;
}
++
Syg