SA-MP Forums

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

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 06/06/2017, 11:32 PM   #1
Little Clucker
Join Date: May 2017
Posts: 21
Reputation: 0
Post I need help for /repair and /acceptrepair please

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):

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]");
  		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);
	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;

Last edited by tekass; 20/06/2017 at 02:11 PM. Reason: New title
tekass 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 07:04 PM.

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