Bonjour, bonsoir, j'ai créer cette petite commande pour pouvoir vendre toutes les maisons de mon serveur d'un coup, car j'ai la fleme de les vendre 1 par 1, il y en a 178, donc j'ai créer ceci, le probleme, s'est que la commande n'a aucun effet, les maison sont toujours achetée et pourtant je pense, que la commande est bien construite. Merci de votre aide
if(strcmp(cmd, "/asellallhouse", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pAdmin] >= 1339)
{
for(new h = 0; h < sizeof(HouseInfo); h++)
{
HouseInfo[h][hHel] = 0;
HouseInfo[h][hArm] = 0;
HouseInfo[h][hHealthx] = 0;
HouseInfo[h][hHealthy] = 0;
HouseInfo[h][hHealthz] = 0;
HouseInfo[h][hArmourx] = 0;
HouseInfo[h][hArmoury] = 0;
HouseInfo[h][hArmourz] = 0;
HouseInfo[h][hLock] = 1;
HouseInfo[h][hOwned] = 0;
HouseInfo[h][hVec] = 418;
HouseInfo[h][hVcol1] = -1;
HouseInfo[h][hVcol2] = -1;
strmid(HouseInfo[h][hOwner], "The State", 0, strlen("The State"), 255);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Vous avez vendu toutes les maisons", HouseInfo[h][hValue]);
GameTextForPlayer(playerid, string, 10000, 3);
OnPropUpdate();
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Vous n'êtes pas autorisé à utiliser cette commande.");
}
}
return 1;
}