SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 20/06/2017, 04:09 PM   #11
Join Date: Jul 2016
Location: My bedroom.
Posts: 835
Reputation: 52
Default Re: Problem with /repair and /accept repair

Hmm? I see that you mixed stuff with each others, I believe you should have used GivePlayerMoney alone and called the variable "Money" in the format using "Montant", I mean.. like that

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, montant);
  		SendClientMessage(playerid, COLOR_ORANGE, string);
                GivePlayerMoney(playerid, montant)
 		GetPlayerName(playerid2, string, sizeof(montant));
  		format(string, sizeof(string), "Le mécanicien a réparé votre véhicule pour -$%d.", montant);
  		SendClientMessage(playerid2, COLOR_ORANGE, string);
                GivePlayerMoney(playerid2, -montant)
	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;
JasonRiggs is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem /repair command buburuzu19 Scripting Help 1 09/09/2014 07:21 AM
Help to covert /accept bodyguard,refill,repair,drugs,sex to pay in paycheck to pay in cash Camataru7 Scripting Help 1 07/07/2014 10:27 AM
Problem with automatic repair UnlimitedFreeroam Scripting Help 3 12/08/2013 12:28 PM
[FilterScript] Auto Car Repair [Full Repair] Vikshay Filterscripts 1 12/07/2013 10:11 PM
Repair pickup problem joska Scripting Help 7 01/01/2013 12:23 PM

All times are GMT. The time now is 04:44 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.