View Single Post
Old 20/06/2017, 03:21 PM   #10
Little Clucker
Join Date: May 2017
Posts: 21
Reputation: 0
Post Re: Problem with /repair and /accept repair

I tried with this new method:

dcmd_reparer(playerid, params[])
	if(PlayerInfo[playerid][pJob] == 1)
	new string[128];
	new montant = strval(params);
	new playerid2 = GetPlayerVehicleID(playerid);
	if(sscanf(params, "ud", playerid2, montant)) return SendClientMessage(playerid, -1, "USAGE: /reparer [ID] [montant]");
  		GetPlayerName(playerid, string,sizeof(montant));
  		format(string, sizeof(string), "%s à réparé le véhicule du client pour $%d.",playerid, GivePlayerMoney(playerid, montant));
  		SendClientMessage(playerid, COLOR_ORANGE, string);
 		GetPlayerName(playerid2, string, sizeof(montant));
  		format(string, sizeof(string), "Le mécanicien a réparé votre véhicule pour -$%d.", GivePlayerMoney(playerid2, -montant));
  		SendClientMessage(playerid2, COLOR_ORANGE, string);
	else return SendClientMessage(playerid, COLOR_RED,"ERREUR: Le client n'est pas dans son véhicule ou vous n'êtes pas mécanicien!");
	if(GetPlayerMoney(playerid2) < montant)
		return SendClientMessage(playerid, COLOR_RED,"ERREUR: Vous n'avez pas asser d'argent sur vous!");
	return 1;
tekass is offline   Reply With Quote