cmdtext[9] ? c'est pas pour les textes normalement ? je te montre un exemple ;)
if (!strcmp(cmd, "/amendre", true))
{
new Joueur[MAX_PLAYER_NAME];
new pid,id,tmp[256];
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREEN, "USAGE: /amende [id] [montant]");
return 1;
}
pid = strval(tmp);
if (!(IsPlayerConnected(pid)))
{
SendClientMessage(playerid, COLOR_RED, "ce joueur n'es pas connecté");
return 1;
}
id = strval(tmp);
GivePlayerMoney(pid,-id);
GetPlayerName(playerid, Joueur, sizeof(Joueur));
format(tmp, sizeof(tmp), "Tu as reçu une amende de %d $ par ",Joueur,tmp);
SendClientMessage(pid,COLOR_YELLOW,tmp);
return 1;
}
voila un peu de que sa donne ;)
++
R@f