06.06.2017, 23:32
(
Последний раз редактировалось tekass; 20.06.2017 в 14:11.
Причина: New title
)
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):
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;
}


