Problem with /repair and /accept repair
#1

Hi all i would need help for a commands with job mechanic.
Here's how I started (you'll notice I'm new to the script):

Код:
//===============================Reparer======================================//
dcmd_reparer(playerid, params[])
{
	if(PlayerInfo[playerid][pJob] == 1)
	{
	new string[128];
	new montant = GivePlayerMoney(playerid, montant);
	new playerid2 = GetPlayerVehicleID(playerid);
	if(sscanf(params, "ud", playerid2, montant)) return SendClientMessage(playerid, -1, "USAGE: /reparer [ID] [montant]");
	{
	if(IsPlayerInAnyVehicle(playerid2))
		{
  		GetPlayerName(playerid, string,sizeof(montant));
  		format(string, sizeof(string), "Vous avez rйparй le vйhicule de %s pour $%d.", GetPlayerVehicleID(playerid2), 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);
  		RepairVehicle(GetPlayerVehicleID(playerid2));
		}
	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;
}
Reply


Messages In This Thread
I need help for /repair and /acceptrepair please - by tekass - 06.06.2017, 23:32
Re: Problem with /repair and /accept repair - by Kane - 06.06.2017, 23:34
Re: Problem with /repair and /accept repair - by tekass - 07.06.2017, 00:11
Re: Problem with /repair and /accept repair - by tekass - 07.06.2017, 00:15
Re: Problem with /repair and /accept repair - by tekass - 07.06.2017, 14:34
Re: Problem with /repair and /accept repair - by MrFantasy - 07.06.2017, 14:39
Re: Problem with /repair and /accept repair - by tekass - 07.06.2017, 22:03
Re: Problem with /repair and /accept repair - by tekass - 07.06.2017, 22:56
Re: Problem with /repair and /accept repair - by tekass - 20.06.2017, 14:15
Re: Problem with /repair and /accept repair - by tekass - 20.06.2017, 15:21

Forum Jump:


Users browsing this thread: 1 Guest(s)