help me pls
#1

This is a car parts order. And the number to break. For example, I put the number 99999999 into my input box, and I received a great deal of money instead of a deduction in the character. I do not know how to solve the problem.

PHP код:
CMD:buycomp(playeridparams[])
{
    new 
amount;
    if (
PlayerData[playerid][pJob] != JOB_MECHANIC)
        return 
ErrorMsg(playerid"§Т№ўН§¤ШідБидґйгЄй¤УКС觹Хй");
    if(!
IsPlayerInRangeOfPoint(playerid5.02424.9688,-2459.3313,13.6250))
    {
        
Waypoint_Set(playerid"Solarin Industries"2424.9688,-2459.3313,13.6250);
        
ErrorMsg(playerid"¤ШідБидґйНВЩи·ХиГйТ№ўТВЄФй№КиЗ№ аГТгЛйа¤ГЧиН§ЛБТВдЗйг№бј№·ХибЕйЗ");
        return 
1;
    }
    else
    {
        new 
vehicleid GetPlayerVehicleID(playerid);
        if (
GetVehicleModel(vehicleid) != 525)
            return 
ErrorMsg(playerid"¤ШідБидґйНВЩиє№ Towtruck");
        if (
sscanf(params"d"amount))
            return 
SyntaxMsg(playerid"/buycomp [amount]");
        if(
PlayerData[playerid][pMoney] <  amount*250)
            return 
ErrorMsg(playerid"¤ШіБХа§Ф№дБиѕН·ХиЁР«ЧйН");
        new 
extrapay 0price 250;
        if(
PlayerData[playerid][pJobEmployed] > 0) { extrapay PlayerData[playerid][pJobEmployed] < 10 ? (PlayerData[playerid][pJobEmployed]) : 50; }
        
price -= extrapay;
        
        
GiveMoney(playerid, -amount*price"buy comp");
        
CoreVehicles[vehicleid][vehComponent] += amount*25;
        
ServerMsg(playerid"¤Ші«ЧйНЄФй№КиЗ№ %d ЄФй№г№ГТ¤Т %s"amountFormatNumber(amount*price));
    }
    return 
1;

Reply
#2

Put a negative on the GiveMoney. and It will deduct the player's money
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)