Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }
- }
- else if(strcmp(x_job,"reparation",true) == 0)
- {
- if(RepairOffer[playerid] < 999)
- {
- if(GetPlayerMoney(playerid) > RepairPrice[playerid])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(IsPlayerConnected(RepairOffer[playerid]))
- {
- GetPlayerName(RepairOffer[playerid], giveplayer, sizeof(giveplayer));
- RepairCar[playerid] = GetPlayerVehicleID(playerid);
- SetVehicleHealth(RepairCar[playerid], 1000.0);
- RepairVehicle(GetPlayerVehicleID(playerid));
- format(string, sizeof(string), "* Vous réparez votre vehicule pour $%d auprès de %s.",RepairPrice[playerid],giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Vous avez réparé le vehicule de %s pour $%d .",sendername,RepairPrice[playerid]);
- SendClientMessage(RepairOffer[playerid], COLOR_WHITE, string);
- PlayerInfo[RepairOffer[playerid]][pMechSkill] ++;
- if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 50)
- { SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Votre skill de mécanicien est maintenant au level 2, vous pouvez maintenant remplir plus d'essence dans les vehicules."); }
- else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 100)
- { SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Votre skill de mécanicien est maintenant au Level 3, vous pouvez maintenant remplir plus d'essence dans les vehicules."); }
- else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 200)
- { SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Votre skill de mécanicien est maintenant au Level 4, vous pouvez maintenant remplir plus d'essence dans les vehicules."); }
- else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 400)
- { SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Votre skill de mécanicien est maintenant au Level 5, vous pouvez maintenant remplir plus d'essence dans les vehicules."); }
- SafeGivePlayerMoney(playerid, -RepairPrice[playerid]);
- SafeGivePlayerMoney(RepairOffer[playerid], RepairPrice[playerid]);
- RepairOffer[playerid] = 999;
- RepairPrice[playerid] = 0;
- SBizzInfo[21][sbTill] += SBizzInfo[21][sbEntranceCost];
- ExtortionSBiz(21, SBizzInfo[21][sbEntranceCost]);
- SBizzInfo[21][sbProducts]--;
- OnPropUpdate(3,21);
- if(IsAnOwnableCar(RepairCar[playerid]))
- {
- if(CarInfo[RepairCar[playerid]][cPrix] >= 1)
- {
- CarInfo[RepairCar[playerid]][cPrix] = CarInfo[RepairCar[playerid]][cPrix] - 3000;
- OnPropUpdate(4,RepairCar[playerid]);
- }
- }
- return 1;
- }
- return 1;
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Vous n'avez pas asser d'argent pour la réparation !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Personne vous a proposé de réparer votre vehicule !");
- return 1;
- }
- }
- else { return 1; }
- }//not connected
- return 1;
- }
- if(strcmp(cmd, "/refill", true) == 0 || strcmp(cmd, "/remplir", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pJob] != 7)
- {
- SendClientMessage(playerid, COLOR_GREY, " Vous n'êtes pas mécanicien!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /remplir [id] [prix]");
- return 1;
- }
- new playa;
- new money;
- playa = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- money = strval(tmp);
- if(money < 1 || money > 9999) { SendClientMessage(playerid, COLOR_GREY, " Le prix doit être compris entre 1 et 9999!"); return 1; }
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa))
- {
- if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, " Vous ne pouvez pas faire ça!"); return 1; }
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Vous proposez à %s de remplir son vehicule d'essence pour $%d .",giveplayer,money);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Mécanicien %s vous propose de remplir d'essence votre vehicule pour $%d, (tapez /accepter plein) pour accepter.",sendername,money);
- SendClientMessage(playa, COLOR_WHITE, string);
- RefillOffer[playa] = playerid;
- RefillPrice[playa] = money;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Ce joueur n'est pas vers vous ou dans un vehicule.");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Ce joueur est hors-ligne.");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/repair", true) == 0 || strcmp(cmd, "/reparer", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pJob] != 7)
- {
- SendClientMessage(playerid, COLOR_GREY, " Vous n'êtes pas mécanicien!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /reparer [id] [prix]");
- return 1;
- }
- new playa;
- new money;
- playa = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- money = strval(tmp);
- if(money < 1 || money > 9999) { SendClientMessage(playerid, COLOR_GREY, " Le prix doit être compris entre 1 et 9999!"); return 1; }
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa))
- {
- if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, " Vous ne pouvez pas faire ça!"); return 1; }
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Vous proposez à %s de réparer son vehicule pour $%d .",giveplayer,money);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Mécanicien %s vous propose de réparer le vehicule pour $%d, (tapez /accepter reparation) pour accepter.",sendername,money);
- SendClientMessage(playa, COLOR_WHITE, string);
- RepairOffer[playa] = playerid;
- RepairPrice[playa] = money;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Ce joueur n'est pas vers vous ou dans la voiture.");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Ce joueur est hors-ligne.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement