Bonjour .
Voila j'ai une commande que j'ai creer pour donner les permis mais elle ne fonctionne qu'avec l'id 0 , Pouvez vous m'aider ?
if(strcmp(cmd, "/donnerpermisBSR", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USAGE:] /donnerpermisBSR [id]");
return 1;
}
new id = strval(tmp);
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
{
if(IsPlayerConnected(id))
{
if(id != INVALID_PLAYER_ID)
{
if(PlayerInfo[playerid][pFlyLic] == 1)
{
format(string, sizeof(string), "Votre permis BSR à été retirer par L'instructeur %s.", GetPlayerNameEx(playerid));
SendClientMessage(id, COLOR_ADMINCMD, string);
DonatorLog(string);
format(string, sizeof(string), "Vous avez enlever le permis BSR de %s .", GetPlayerNameEx(id));
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, string);
PlayerInfo[giveplayerid][pFlyLic] = 0;
}
else
{
format(string, sizeof(string), "Vous avez reçu le BSR , Instructeur %s.", GetPlayerNameEx(playerid));
SendClientMessage(id, COLOR_ADMINCMD, string);
DonatorLog(string);
format(string, sizeof(string), "Vous avez donné le BSR à %s .", GetPlayerNameEx(id));
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, string);
PlayerInfo[giveplayerid][pFlyLic] = 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Mauvais ID.");
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Vous N'etes pas Instructeur de L'auto Ecole.");
}
}
return 1;
}