Bon merci à tous de votre aide, voilà mon code:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(EnBraquage[i] && IsPlayerInRangeOfPoint(i, 1.0, x, y, z))
{
countbraqueur++;
}
} if(countbraqueur >= 2)
{
MONCODE
}
else
{
SendClientMessage(playerid, COLOR_RED, "Il doit y avoir 2 personnes proches du coffres avec vous!");
return 1;
}
public Envoyeraceuxquibraques(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(EnBraquage[i])
{
SendClientMessage(i, color, string);
}
}
}
}
NB: petit éxemple de l'utilisation de se public :
format(string, sizeof(string), "Vous essayez d'ouvir le coffre, vous devez attendre pendant 5 minutes!");
Envoyeraceuxquibraques(COLOR_YELLOW, string);
format(string, sizeof(string), "L'alarme c'est déclanché, la police est maintenant avértis de votre braquage!");
Envoyeraceuxquibraques(COLOR_YELLOW, string);
Gros merci à vous