Price of Sprunk and Pay n Spray
#1

How do you change the price of sprunk/pay n spray... or disable them?
Reply
#2

Quote:
Originally Posted by cAMo
How do you change the price of sprunk/pay n spray... or disable them?
You cannot change the prices, you can only refund them or cost more... Look at your script, you should see

pawn Код:
public OnVehicleRespray()
or something similar... That is where you can take/give players money.
Reply
#3

I want to stop players from buying from vending machines and prevent them from spraying their cars.
Reply
#4

the ONLY way ive Ever seen anyone stop a player from using a vending machine, is by instantly resetting the animation and adding 1 to player money if near a Vending Machine and the action key is pressed.

The Downfall to this ... you would have to literally get the coords from EVERY vending machine on the MAP. And before you ask, the answer is NO, nobody has released a list of Coords for All Vending Machines.
Reply
#5

Just place an object like a huge box over it like Arognath RPG does.
Reply
#6

Rofl, and at the pay n sprays, put a gate :O

But still you need to find all of them in SA
Reply
#7

that STILL poses the Problems of ( You have to Find Coords for every Machine ) doenst it...

And if your going to go that far, you may as well add like 5 lines to the OnPlayerKeyStateChange Call and use your 'Objects' for a better purpose!
Reply
#8

Basically, you cannot stop them from using the machines. If you have the time, than maybe you can. I doubt its going to be such a problem though, I mean it's only 1 dollar they spend to buy a thing of Sprunk that lasts about 10 seconds of an animation.
Reply
#9

you can with this function on my script, not perfect but it has the position of all the sprunk machines

pawn Код:
forward IsAtCandySprunk(playerid);
forward SetHP(playerid);
new TookSprunk[MAX_PLAYERS];
add this on onplayerkeystatechange (this changes the price):

pawn Код:
if((newkeys == KEY_SECONDARY_ATTACK) && IsAtCandySprunk(playerid))
{
    if(TookSprunk[playerid] == 0)
    {
        new Float:health;
        GetPlayerHealth(playerid, health);
        if(health != 0)
        {
            SetRealMoney(playerid, -24);
            SendClientMessage(playerid, COLOR_GREY, "* You paid 25$ to the Machine");
            TookSprunk[playerid] = 1;
            SetTimerEx("SetHP",3750,false, "i", playerid);
        }
    }
}
pawn Код:
public SetHP(playerid)
{
    TookSprunk[playerid] = 0;
    return 1;
}
pawn Код:
public IsAtCandySprunk(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 2, -2420.219, 984.578, 44.297)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2420.180, 985.945, 44.297)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2225.203, -1153.422, 1025.906)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2576.703, -1284.430, 1061.094)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2155.906, 1606.773, 1000.055)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2209.906, 1607.195, 1000.055)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2222.203, 1606.773, 1000.055)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 495.969, -24.320, 1000.734)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 501.828, -1.430, 1000.734)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 373.828, -178.141, 1000.734)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 330.680, 178.500, 1020.070)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 331.922, 178.500, 1020.070)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 350.906, 206.086, 1008.477)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 361.563, 158.617, 1008.477)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 371.594, 178.453, 1020.070)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 374.891, 188.977, 1008.477)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2155.844, 1607.875, 1000.063)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2202.453, 1617.008, 1000.063)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2209.242, 1621.211, 1000.063)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2222.367, 1602.641, 1000.063)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 500.563, -1.367, 1000.734)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 379.039, -178.883, 1000.734)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2480.86,-1959.27,12.9609)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 1634.11,-2237.53,12.8906)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2139.52,-1161.48,23.3594)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2153.23,-1016.15,62.2344)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -1350.12,493.859,10.5859)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2229.19,286.414,34.7031)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 1659.46,1722.86,10.2188)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2647.7,1129.66,10.2188)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2845.73,1295.05,10.7891)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 1398.84,2222.61,10.4219)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -1455.12,2591.66,55.2344)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -76.0312,1227.99,19.125)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 662.43,-552.164,15.7109)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -253.742,2599.76,62.2422)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2271.73,-76.4609,25.9609)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 1789.21,-1369.27,15.1641)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 1729.79,-1943.05,12.9453)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2060.12,-1897.64,12.9297)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 1928.73,-1772.45,12.9453)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2325.98,-1645.13,14.2109)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2352.18,-1357.16,23.7734)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 1154.73,-1460.89,15.1562)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -1350.12,492.289,10.5859)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2118.97,-423.648,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2118.62,-422.414,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2097.27,-398.336,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2092.09,-490.055,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2063.27,-490.055,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2005.65,-490.055,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2034.46,-490.055,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2068.56,-398.336,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2039.85,-398.336,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2011.14,-398.336,34.7266)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -1980.79,142.664,27.0703)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2319.99,2532.85,10.2188)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 1520.15,1055.27,10.00)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2503.14,1243.7,10.2188)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2085.77,2071.36,10.4531)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -862.828,1536.61,21.9844)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -14.7031,1175.36,18.9531)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, -253.742,2597.95,62.2422)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 201.016,-107.617,0.898438)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 1277.84,372.516,18.9531)) return 1;
    else return 0;
}
i changed the price of the sprunks to 25$ on my script, when the action key is pressed, i call that function, if it returns 1, remove 24$ (24 by script and 1 by game, total 25$).
Reply
#10

well, thats a pretty long list of locations.... ( PS Your missing about a Dozen give or take )

Camo, and anyone else ...thats probably the most accurate list ive seen in a while, I suggest you use it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)