Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

help me pls

$
0
0
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 Code:

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;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>