I need help for /repair and /acceptrepair please -
tekass - 06.06.2017
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;
}
Re: Problem with /repair and /accept repair -
Kane - 06.06.2017
Change the "z" in
if(sscanf(params, "uz", playerid2, montant)) to a
d.
Re: Problem with /repair and /accept repair -
tekass - 07.06.2017
Ha yes thanks fot this info
+1 rep for you
Re: Problem with /repair and /accept repair -
tekass - 07.06.2017
i need again help for for call "money" whitout the defined with GetPlayerMoney(playerid,money) please.
Re: Problem with /repair and /accept repair -
tekass - 07.06.2017
new problem...
Код:
C:\Users\KEVIN\Desktop\New_RP_Life\pawno\include\YSI\..\YSI_Storage\..\YSI_Internal\amx_assembly.inc(38) : fatal error 111: user error: Please update "https://github.com/Zeex/amx_assembly" to get "deref()"
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
i have download y_assembly.inc at
https://github.com/Zeex/amx_assembly but it's always the same...
You have idea? :/
Re: Problem with /repair and /accept repair -
MrFantasy - 07.06.2017
Search
https://sampforum.blast.hk/showthread.php?pid=3730318#pid3730318
Re: Problem with /repair and /accept repair -
tekass - 07.06.2017
i have extracted the amx_assembly folder in YSI/amx and nothing same with YSI_Internal or Ysi_Storage
i don't know what to do... :/
Re: Problem with /repair and /accept repair -
tekass - 07.06.2017
Ha is good it's my command /accepterep but i don't know the relationship with YSI...
The suject is return at the normaly
Re: Problem with /repair and /accept repair -
tekass - 20.06.2017
I thinks i need to remake all the command with another method...You have an idea please?
Re: Problem with /repair and /accept repair -
tekass - 20.06.2017
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]");
{
if(IsPlayerInAnyVehicle(playerid2))
{
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);
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;
}