Locations for ChilliDog Stands, Mr Whoopee Stands, Noodle Stands and Pay Phones [Code Snippet]
#1

Hello All,

[If you don't want to read why i only post snippets and that i hope that i posted in the correct section,
then just skip to the code to use the default in game, Noodles, Mr Whoopee or ChillieDog Stands and
Pay Phone locations on your server with this small snippet ]

I really hope that I'm posting in the correct forum/section, I've already checked the rules and forums twice
(please don't tell me that I'm blind if i did not see it :P) but i could not find the place to post a snippet that
could be useful for other players. so lets hope that this is the correct section. If not please point me to the
right direction where i could post snippets to help others.

Because i mainly only script on my own server to expand it and don't have much time to develop entire
filter-scripts and game-modes for others i will mostly post snippets when i think that something could be
useful to others. In my daily job I'm also a .NET software developer, and i just don't have the
motivation to develop something that i make in my 'hobby time' (my sa-mp server) in a Object Orientated
or Modular way so that others 'could' use it. Because almost everything in my server is locked and linked
to XP, levels, unlocks etc. So making these modules/scripts usable in a way that other servers could
use them, that would take properly more time from me than my daily job

Now about my snippet: I've already read on several forms or pages that people where looking for
all the Pay-phone locations (coordinates) in SA-MP for example and a friend of me asked me for all
the Mr Whoopee locations. Now i've been using those locations for a long time in my own RP server
and created a couple of array's and stock's to detect if a player is near a stand or phone.
So that people for example can buy food/health or make a phone call.

I've copied those array's and stocks to this snippet, hoping that other people could use them also.
I'm NOT trying to show off a "piece of code" or to get rep, kudo's or what ever it is called here
Just hoping to help some other people/scripters out there.

If i forgot to add some kind (other type) of usable stand please mention it and i will add them to,
(i would also love to add more Original World support to my server also )

I've created the snipped, stocks and array's myself so it's not copy-paste from someone else,
I'm not asking for any credits if you're using this, but i do think it would be nice if you're at least
posting/replying here that you are using it. This way i know i'm not posting this stuff for nothing

So here's the snippet, hope it's useful:

pawn Код:
//==========================================================
//Alle DEFAULT Chilli Dogs Stands
//==========================================================
new Float:ChilliDogStands[][3] = {
{1589.6953, -1287.2656, 17.6406},
{1000.4844, -1849.0391, 12.7969},
{388.8594, -2071.6641, 7.9453},
{-2691.6797, 384.4922, 4.4844},
{-2146.5156, -424.7734, 35.3281},
{-2094.2344, -396.4609, 35.6563},
{-2036.3203, -396.7578, 35.6563},
{2537.8203, 2137.1250, 10.8594},
{2327.8594, 2421.2500, 10.8594},
{1558.1953, 979.4453, 10.9453},
{2144.6406, 1441.9297, 10.8516},
{-799.7813, 1624.2188, 27.1250},
{-197.4922, 2659.9141, 62.8203},
{-2199.9922, -2386.8906, 30.7188}
};

stock PlayerNearChilliDog(playerid)
{
    for(new i = 0;i<sizeof(ChilliDogStands);i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0,ChilliDogStands[i][0],ChilliDogStands[i][1],ChilliDogStands[i][2]) && GetPlayerState(playerid)==PLAYER_STATE_ONFOOT)
        {
            return i;
        }
    }
    return -1;
}
//==========================================================




//==========================================================
//All DEFAULT Mr Whoopee Stands
//==========================================================
new Float:MrWhoopeeStands[][3] = {
{-2286.5391, 147.6328, 35.3203},
{-2384.2266, -584.0078, 132.1094},
{2538.0313, 2153.7031, 10.7344},
{2295.7109, 2250.1016, 10.7344},
{1030.5938, 1362.5938, 10.8125},
{2125.1328, 1442.0781, 10.7031},
{2175.0859, 1523.4141, 10.7344}
};

stock PlayerNearWhoopee(playerid)
{
    for(new i = 0;i<sizeof(MrWhoopeeStands);i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0,MrWhoopeeStands[i][0],MrWhoopeeStands[i][1],MrWhoopeeStands[i][2]) && GetPlayerState(playerid)==PLAYER_STATE_ONFOOT)
        {
            return i;
        }
    }
    return -1;
}
//==========================================================




//==========================================================
//All DEFAULT Noodle Stands
//==========================================================
new Float:NoodleStands[][3] = {
{-2515.7891, -15.6172, 25.6328},
{-2151.8438, -435.5625, 35.2891},
{-2193.7734, 605.1875, 35.2109},
{-2194.0234, 613.4063, 35.2109},
{-2197.5859, 613.4063, 35.2109},
{-2181.4766, 613.7031, 35.2109},
{-2187.1484, 614.5469, 35.2109},
{2536.1172, 2290.8516, 10.8594}
};

stock PlayerNearNoodles(playerid)
{
    for(new i = 0;i<sizeof(NoodleStands);i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0,NoodleStands[i][0],NoodleStands[i][1],NoodleStands[i][2]) && GetPlayerState(playerid)==PLAYER_STATE_ONFOOT)
        {
            return i;
        }
    }
    return -1;
}
//==========================================================




//==========================================================
//All DEFAULT Phone Booth locations
//==========================================================
new Float:PhoneBooths[][3] = {
{1721.6719, -1721.2891, 13.2266},
{1721.6719, -1720.3906, 13.2266},
{1722.6094, -1721.2891, 13.2266},
{1722.6094, -1720.3906, 13.2266},
{1711.3438, -1606.0391, 13.2266},
{1709.9922, -1604.9141, 13.2266},
{1805.4063, -1600.4609, 13.2266},
{1806.3906, -1599.6172, 13.2266},
{1807.3828, -1598.7813, 13.2266},
{1808.3750, -1597.9219, 13.2266},
{1809.3438, -1597.0859, 13.2266},
{2165.9219, -1155.8047, 24.4141},
{2165.9219, -1154.9609, 24.4141},
{2257.6563, -1211.1875, 23.6797},
{2259.2031, -1211.2109, 23.6797},
{2069.0000, -1766.6641, 13.2109},
{2068.9375, -1767.8359, 13.2109},
{303.0313, -1593.3125, 32.5156},
{302.0859, -1593.2031, 32.5156},
{295.1641, -1573.0625, 33.1563},
{296.7578, -1573.2969, 33.1563},
{247.7109, -1447.9844, 13.9531},
{339.1875, -1398.0469, 14.2266},
{355.8047, -1364.9531, 14.1641},
{356.3828, -1364.6797, 14.1641},
{523.1563, -1525.6172, 14.3438},
{523.1563, -1516.4219, 14.3438},
{546.3828, -1497.4922, 14.8047},
{546.3828, -1499.1797, 14.8047},
{638.0313, -1228.6641, 17.7891},
{638.0313, -1228.0234, 17.8203},
{279.1875, -1630.7813, 32.9297},
{278.5547, -1630.6719, 32.9297},
{379.1094, -1717.0469, 23.0391},
{379.1094, -1717.9141, 22.7734},
{-2550.3672, 2320.4766, 5.3203},
{-2553.0547, 2320.4844, 5.3203},
{-2451.4063, 2321.0234, 5.3203},
{-1967.3594, 162.8672, 27.3516},
{-1966.2813, 162.8672, 27.3516},
{-1965.2109, 162.8672, 27.3516},
{-1964.1406, 162.8672, 27.3516},
{-1696.6875, 1334.4766, 6.8828},
{-1689.1172, 1359.5469, 6.8828},
{-1661.5938, 1398.0938, 6.8828},
{-2419.3516, 718.2109, 34.8594},
{2279.2578, 2524.9844, 10.5391},
{2279.2578, 2526.7344, 10.5391},
{2279.2578, 2528.5547, 10.5391},
{1098.3984, 1201.9844, 11.1719},
{1097.0938, 1201.9844, 11.1719},
{1112.2188, 1382.5938, 11.1719},
{1110.8672, 1382.5938, 11.1719},
{1109.5078, 1382.5938, 11.1719},
{1574.7266, 736.9844, 11.1484},
{1558.1172, 1015.6875, 11.1719},
{1558.1328, 1017.0234, 11.1719},
{1688.0859, 1266.9766, 11.1484},
{1689.3906, 1266.9766, 11.1484},
{672.4297, -589.0938, 16.6797},
{1380.2500, 466.5156, 20.4844}
};

stock PlayerNearPayPhone(playerid)
{
    for(new i = 0;i<sizeof(PhoneBooths);i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0,PhoneBooths[i][0],PhoneBooths[i][1],PhoneBooths[i][2]) && GetPlayerState(playerid)==PLAYER_STATE_ONFOOT)
        {
            return i;
        }
    }
    return -1;
}
//==========================================================
EDIT/Addition:
If you find any other location of these stands or phones that do not work, just reply me with the coordinates
(or try to explain as good as possible where it is if you don't know how to save the coordinates by using the
/save command and the savedpositions.txt) and i will check them and add them to the array.
It could be possible that some stands are part of a larger object like a shopping mall for example
(that R* glued the Stand to the shopping mall floor :P) then it would be possible
that it is not in the list. I doubt that i missed one but please do tell me it there are locations that do not work.
Feedback to improve the list is always welcome of course. If one of our players reports non working locations i
will add them here also. I don't think they will find them anytime soon because we're already using these array's
for a while without any complaints, so i think i got them all. But again just report them if some aren't working.

P.S: The stocks are 'scripted' that they would only return stand/phone id when the player is onfoot!

Enjoy,
VenomXNL
Reply
#2

It might go here:

https://sampforum.blast.hk/showthread.php?tid=281

Or you may post it as a tutorial. Doesn't really matter. Good job anyways. Useful.
Reply
#3

Thanks, i will consider those locations next time i want/will post a snippet,
And thanks for the positive feedback
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)