Skip to content

Instantly share code, notes, and snippets.

@realStandal
Created July 19, 2019 00:28
Show Gist options
  • Save realStandal/406b698c5dfe964b70dae13dd319143d to your computer and use it in GitHub Desktop.
Save realStandal/406b698c5dfe964b70dae13dd319143d to your computer and use it in GitHub Desktop.
Vice City Areas for PAWN.
#include <a_samp>
#include <core>
#include <float>
#pragma tabsize 0
enum E_SAZONE
{
zName[34],
Float:zArea[6]
};
new ZonesList[][E_SAZONE] =
{
// Vice City
{"Escobar International", {5611.79, -9279.61, 0.0, 6291.79, -7269.61, 300.0}},
{"Escobar International", {5640.63, -8315.63, 0.0, 6242.19, -7807.81, 500.0}},
{"Escobar International", {5609.38, -9276.56, 0.0, 6257.81, -8315.63, 500.0}},
{"Leaf Links", {7286.27, -7741.429, 0.0, 7663.656, -6702.395, 300.0}},
{"Vice City Junkyard", {6291.79, -7269.61, 300.0, 6103.24, -7542.9113, 500.0}},
{"Viceport", {6291.79, -9279.61, 0.0, 7246.794, -8398.738, 300.0}},
{"Washington Beach", {7812.50, -7378.13, 0.0, 8093.75, -7245.31, 500.0}},
{"Washington Beach", {7718.75, -7550.00, 0.0, 8093.75, -7378.13, 500.0}},
{"Washington Beach", {7937.50, -7979.69, 0.0, 8093.75, -7550.00, 500.0}},
{"Washington Beach", {7718.75, -7800.00, 0.0, 7890.63, -7550.00, 500.0}},
{"Washington Beach", {7546.88, -7979.69, 0.0, 7937.50, -7800.00, 500.0}},
{"Washington Beach", {7507.81, -8135.94, 0.0, 8023.44, -7979.69, 500.0}},
{"Washington Beach", {7593.75, -8300.00, 0.0, 8000.00, -8135.94, 500.0}},
{"Ocean Beach", {7718.75, -8706.25, 0.0, 7906.25, -8300.00, 500.0}},
{"Ocean Beach", {7554.69, -8612.50, 0.0, 7718.75, -8300.00, 500.0}},
{"Ocean Beach", {7304.69, -8612.50, 0.0, 7554.69, -8354.69, 500.0}},
{"Ocean Beach", {7250.00, -8768.75, 0.0, 7718.75, -8612.50, 500.0}},
{"Ocean Beach", {7718.75, -9057.81, 0.0, 7835.94, -8706.25, 500.0}},
{"Ocean Beach", {7273.44, -8925.00, 0.0, 7718.75, -8768.75, 500.0}},
{"Ocean Beach", {7320.31, -9120.31, 0.0, 7718.75, -8925.00, 500.0}},
{"Prawn Island", {7492.19, -6682.81, 0.0, 7625.0, -6464.06, 500.0}},
{"Prawn Island", {7328.13, -6682.81, 0.0, 7492.19, -6464.06, 500.0}},
{"Prawn Island", {7328.13, -6464.06, 0.0, 7625.0, -6245.31, 500.0}},
{"Little Havana", {6562.5, -8050.0, 0.0, 6765.63, -7925.0, 500.0}},
{"Little Havana", {6562.5, -8245.31, 0.0, 6726.56, -8050.0, 500.0}},
{"Little Havana", {6429.69, -8245.31, 0.0, 6562.5, -8050.0, 500.0}},
{"Little Havana", {6296.88, -8268.75, 0.0, 6429.69, -8050.0, 500.0}},
{"Little Havana", {6468.75, -7925.0, 0.0, 6710.94, -7815.63, 500.0}},
{"Little Havana", {6242.19, -8050.0, 0.0, 6562.5, -7925.0, 500.0}},
{"Little Havana", {6242.19, -7925.0, 0.0, 6468.75, -7815.63, 500.0}},
{"Little Havana", {6257.81, -8604.69, 0.0, 6750.0, -8268.75, 500.0}},
{"Little Havana", {6355.81, -8396.48, 0.0, 6435.23, -8258.38, 500.0}},
{"Little Havana", {6435.23, -8440.32, 0.0, 6584.84, -8353.49, 500.0}},
{"Little Havana", {6474.38, -8520.69, 0.0, 6584.84, -8440.32, 500.0}},
{"Little Havana", {6446.92, -8597.13, 0.0, 6584.84, -8520.69, 500.0}},
{"Little Havana", {6584.84, -8619.02, 0.0, 6658.99, -8520.69, 500.0}},
{"Little Haiti", {6242.19, -7815.63, 0.0, 6710.94, -7753.13, 500.0}},
{"Little Haiti", {60.0, -7753.13, 0.0, 6710.94, -7464.06, 500.0}},
{"Little Haiti", {6710.94, -7612.5, 0.0, 6820.31, -7323.44, 500.0}},
{"Little Haiti", {6710.94, -7323.44, 0.0, 6859.38, -7120.31, 500.0}},
{"Little Haiti", {6242.19, -7753.13, 0.0, 60.0, -7565.63, 500.0}},
{"Little Haiti", {6218.75, -7565.63, 0.0, 60.0, -7464.06, 500.0}},
{"Little Haiti", {6335.94, -7464.06, 0.0, 6710.94, -7276.56, 500.0}},
{"Little Haiti", {6335.94, -7276.56, 0.0, 6710.94, -7096.88, 500.0}},
{"Construction Site", {7517.343, -7937.028, 0.0, 7778.236, -7745.832, 100.0}},
{"InterGlobal Films", {7363.597, -6647.958, 0.0, 7515.6971, -6454.25, 100.0}},
{"Kaufman Cabs", {6484.64, -7321.087, 0.0, 6505.965, -7278.245, 100.0}},
{"Kaufman Cabs", {6506.617, -7323.525, 0.0, 6520.147, -7280.683, 100.0}},
{"Sunshine Auto's", {6439.46, -8410.663, 0.0, 6540.298, -8307.183, 100.0}},
{"Downtown Vice City", {6296.9, -7096.88, 0.0, 6593.75, -6281.25, 500.0}},
{"Downtown Vice City", {6593.8, -7096.88, 0.0, 6710.94, -6710.94, 500.0}},
{"Downtown Vice City", {6710.94, -7120.31, 0.0, 6968.75, -6893.75, 500.0}},
{"Downtown Vice City", {6765.63, -6893.75, 0.0, 7031.25, -6760.94, 500.0}},
{"Downtown Vice City", {6851.56, -6760.94, 0.0, 7085.94, -6604.69, 500.0}},
{"Downtown Vice City", {6851.56, -6604.69, 0.0, 7218.75, -6378.12, 500.0}},
{"Downtown Vice City", {6593.75, -6760.94, 0.0, 6851.56, -6675.0, 500.0}},
{"Downtown Vice City", {6593.75, -6675.0, 0.0, 6851.56, -6378.12, 500.0}},
{"Downtown Vice City", {6976.56, -6378.12, 0.0, 7257.81, -6104.69, 500.0}},
{"Downtown Vice City", {6593.75, -6378.12, 0.0, 6976.56, -6276.56, 500.0}},
{"Downtown Vice City", {6445.31, -6276.56, 0.0, 6593.75, -6003.12, 500.0}},
{"Downtown Vice City", {6593.75, -6276.56, 0.0, 6976.56, -6159.37, 500.0}},
{"Downtown Vice City", {6593.75, -6159.37, 0.0, 6695.31, -6003.12, 500.0}},
{"Downtown Vice City", {6695.31, -6159.37, 0.0, 6914.06, -6003.12, 500.0}},
{"Vice Point", {7671.88, -6276.56, 0.0, 8093.75, -6151.56, 500.0}},
{"Vice Point", {7750.0, -6432.81, 0.0, 8093.75, -6276.56, 500.0}},
{"Vice Point", {7773.44, -6643.75, 0.0, 8093.75, -6432.81, 500.0}},
{"Vice Point", {7656.25, -6878.13, 0.0, 7890.63, -6643.75, 500.0}},
{"Vice Point", {7890.63, -6878.13, 0.0, 8093.75, -6643.75, 500.0}},
{"Vice Point", {7843.75, -7034.38, 0.0, 8093.75, -6878.13, 500.0}},
{"Vice Point", {7843.75, -7034.38, 0.0, 8093.75, -6878.13, 500.0}},
{"Vice Point", {7750.0, -7245.31, 0.0, 8093.75, -7034.38, 500.0}},
{"Hyman Memorial Stadium", {5921.88, -6331.25, 0.0, 6445.31, -5948.44, 500.0}},
{"Vice City Printworks", {6362.76, -7815.199, 0.0, 6458.24, -7660.199, 500.0}},
{"Fort Baxter Air Base", {5701.95, -7815.199, 0.0, 5944.15, -7541.9074, 500.0}},
{"Starfish Island", {6765.63, -7971.88, 0.0, 7031.25, -7729.69, 500.0}},
{"Starfish Island", {7031.25, -7971.88, 0.0, 7140.63, -7729.69, 500.0}},
{"Starfish Island", {7140.63, -7971.88, 0.0, 7343.75, -7729.69, 500.0}},
{"Starfish Island", {6960.94, -8182.81, 0.0, 7343.75, -7971.88, 500.0}},
{"Starfish Island", {6765.63, -8182.81, 0.0, 6960.94, -7971.88, 500.0}},
{"Vice City Beach", {8093.75, -9323.44, 0.0, 8492.19, -6151.56, 500.0}},
{"Vice City Beach", {8023.44, -9315.63, 0.0, 8093.75, -7979.69, 500.0}},
{"Vice City Beach", {7906.25, -9307.81, 0.0, 8023.44, -8300.0, 500.0}},
{"Vice City Beach", {7351.56, -9307.81, 0.0, 7906.25, -9120.31, 500.0}},
{"Vice City Beach", {7835.94, -9120.31, 0.0, 7906.25, -8706.25, 500.0}},
{"Vice City Beach", {7718.75, -9120.31, 0.0, 7835.94, -9057.81, 500.0}},
{"Vice City", {50.0, -50.0, -50.0, 10000.0, -10000.0, 2000.0}}
};
main()
{
print("\n----------------------------------");
print(" Bare Script\n");
print("----------------------------------\n");
}
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"~w~SA-MP: ~r~Bare Script",5000,5);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/gotovc", true) == 0) {
SetPlayerPos(playerid, 7520.343, -7937.028, 0.0);
return 1;
}
else if(strcmp(cmd, "/whereami", true) == 0) {
new str[128],
Float:posX,
Float:posY,
Float:posZ;
GetPlayerPos(playerid, posX, posY, posZ);
for(new i = 0, j = sizeof ZonesList; i < j; i++) {
printf(ZonesList[i][zName]);
if((posX > ZonesList[i][zArea][0] && posX < ZonesList[i][zArea][3]) && (posY > ZonesList[i][zArea][1] && posY < ZonesList[i][zArea][4])) {
format(str, sizeof str, "%s", ZonesList[i][zName]);
SendClientMessage(playerid, -1, str);
}
}
printf("%f %f %f", posX, posY, posZ);
return 1;
}
return 0;
}
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
return 1;
}
public OnGameModeInit()
{
SetGameModeText("Bare Script");
ShowPlayerMarkers(1);
ShowNameTags(1);
AllowAdminTeleport(1);
AddPlayerClass(265,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment