bonjour
Ma commande marche bien mais quand je veut l'utiliser elle me dit que je suis pas Admin, alors que je suis Admin ( Lvl 2 le max )
voila un passage du script
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok (cmdtext, idx);
new pidName[MAX_PLAYER_NAME];
if (!strcmp(cmd, "/rechercher", true))
{
if(IsPlayerAdmin(playerid))
{
new pid, tmpp[128];
tmpp = strtok(cmdtext, idx);
new string[128];
new string2[128];
if (!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_GREEN, "USAGE: /rechercher [playerid]");
return 1;
}
pid = strval(tmpp);
if (!(IsPlayerConnected(pid)))
{
SendClientMessage(playerid, COLOR_RED, "Ce joueur n'est pas connect?.");
return 1;
}
GetPlayerName(pid, pidName, sizeof(pidName));
format(tmpp, sizeof(tmpp), "Vous avez fait rechercher %s (ID:%d)",pidName,pid);
SendClientMessage(playerid, COLOR_RED, tmpp);
format(tmpp, sizeof(tmpp), "Attention tu est recherché? ! Le premier qui te tuera enpochera la prime de %d$",Montant);
SendClientMessage(pid, COLOR_RED, tmpp);
SendClientMessage(pid, COLOR_RED, "Fuis vite ... Bonne Chance !!!");
format(string, sizeof(string), "Attention %s (ID:%d) est recherch? ! Tuez le pour gagnez la prime de %d$",pidName,pid,Montant);
SendClientMessageToAll(COLOR_ORANGE, string);
format(string2, sizeof(string2), "~w~[][][]~r~%s~b~est recherche !~n~ Tuez le pour gagner %d$ ~w~[][][]", pidName,Montant);
GameTextForAll(string2, 5000, 3);
SetPlayerHealth(pid,100);
SetPlayerArmour(pid,100);
SetPlayerWantedLevel(pid,6);
SetPlayerColor(pid,COLOR_RECHERCHER);
format(playerfinal, 32, "[Rechercher]%s", initialname[pid]);
SetPlayerName(pid, playerfinal);
Rechercher[pid] = 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "Tu n'es pas admin !!!");
}
return 1;
}
J'ai cherché mais pas trouvé ou est l'érreur