17.08.2014, 09:05
Problem: Some players helped me out before figuring out the problem of the robbery system and well my problem all along was when i enter an interior the checkpoint doesn't work. So i've went into the defualt grandlarc gamemode to test it out and iv'e teleported into well stacked pizza interior. The checkpoint of the robbery system worked even the command so it all comes to this. Something in my code here for sure it wrong. I want to make interiors that i can put checkpoints inside like robbery ones and well my interior code seemed to be the problem all along. So can you arrange it for me please. In Pawn this will work but I think it's wrong cause i can't add checkpoints that do stuff in interiors cause they dont work. And well when i tested it with tp without interiros cps it worked fine.
pawn Код:
#include <a_samp>
#include <streamer>
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GREEN 0x33AA33AA
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_ORANGE 0xFFA500AA
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
//Labels - Outside
Create3DTextLabel("The Hospital\nTo go in - /enter", 0xF69521AA, 1171.9349, -1323.3588, 15.6237, 40.0, 0, 0);//Market
Create3DTextLabel("The Ammunation\nTo go in - /enter", 0xF69521AA, 1369.1910, -1279.8019, 13.5012, 40.0, 0, 0); //Market
Create3DTextLabel("The Ammunation\nTo go in - /enter", 0xF69521AA, 2400.4875, -1982.1741, 13.8333, 40.0, 0, 0); //Willwofield
Create3DTextLabel("24/7 Shop\nTo go in - /enter", 0xF69521AA, 1928.3933, -1776.2915, 13.7475, 40.0, 0, 0);//Idlewood
Create3DTextLabel("Barber Shop\nTo go in - /enter", 0xF69521AA, 2070.4406, -1793.8759, 13.9753, 40.0, 0, 0);//Idlewood
Create3DTextLabel("Sex Shop\nTo go in - /enter", 0xF69521AA, 1939.7274, -2116.0525, 13.8920, 40.0, 0, 0);//Near LSA
Create3DTextLabel("Barber Shop\nTo go in - /enter", 0xF69521AA, 824.1439, -1588.1305, 13.7715, 40.0, 0, 0);//Market
Create3DTextLabel("Donuts Shop\nTo go in - /enter", 0xF69521AA, 1038.1526, -1340.8704, 14.0354, 40.0, 0, 0);//Donuts
Create3DTextLabel("Well Stacked Pizza\nTo go in - /enter", 0xF69521AA, 2105.6504, -1806.5336, 13.6466, 40.0, 0, 0);//Pizza
Create3DTextLabel("City Hall\nTo go in - /enter", 0xF69521AA, 1481.0562, -1772.6560, 19.0688, 40.0, 0, 0);//City hall
//Create3DTextLabel("Tattoo Shop\nTo go in - /enter", 0xF69521AA, 1481.0562, -1772.6560, 19.0688, 40.0, 0, 0);//Tatoo Shop
//Labels Inside
Create3DTextLabel("Sex Shop\nTo go out - /exit", 0xF69521AA, -100.3160, -25.2458, 1000.9834, 40.0, 0, 0);//Near LSA
Create3DTextLabel("Barber Shop\nTo go out - /exit", 0xF69521AA, 418.5894, -84.5880, 1002.3385, 40.0, 2, 0);//Market/Idlewood
Create3DTextLabel("Barber Shop\nTo go out - /exit", 0xF69521AA, 418.5894, -84.5880, 1002.3385, 40.0, 3, 0);//Market/Idlewood
Create3DTextLabel("The Hospital\nTo go out - /exit", 0xF69521AA, -204.4669, -1735.1835, 676.0109, 40.0, 0, 0);//Market
Create3DTextLabel("The Ammunation\nTo go out - /exit", 0xF69521AA, 314.2462, -223.0903, 999.7376, 40.0, 2, 0);//Willowfield/Market
Create3DTextLabel("The Ammunation\nTo go out - /exit", 0xF69521AA, 314.2462, -223.0903, 999.7376, 40.0, 3, 0);//Same as up^^ ammu
Create3DTextLabel("24/7 Shop\nTo go out - /exit", 0xF69521AA, -59.2007, -110.4730, 1003.8173, 40.0, 0, 0);//24/7
Create3DTextLabel("Donut Shop\nTo go out - /exit", 0xF69521AA, 377.1189, -193.6500, 1000.5577, 40.0, 0, 0);//Donuts
Create3DTextLabel("Well Stacked Pizza\nTo go out - /exit", 0xF69521AA, 372.3570, -133.7821, 1001.6050, 40.0, 0, 0);//Pizza
Create3DTextLabel("City Hall\nTo go out - /exit", 0xF69521AA, 390.9867, 173.7820, 1008.6768, 40.0, 0, 0);//City hall
AddStaticPickup(1318, 1, 1172.0773,-1323.4209,15.4032, -1); //hospital
AddStaticPickup(1318, 1, -204.5060,-1736.0486,675.7687, -1); //hospital
//AddStaticPickup(1318, 1, 2068.2229, -1779.8477, 13.2143, -1); //tattoo outside
//AddStaticPickup(1318, 1, 2068.2229, -1779.8477, 13.2143, -1); //tattoo inside/
AddStaticPickup(1318, 1, 2105.7077, -1806.5243, 13.1974, -1); //Pizza outside
AddStaticPickup(1318, 1, 372.3692, -133.8471, 1001.0909, -1); //Pizza interior
AddStaticPickup(1318, 1, 1481.0745,-1772.3140,18.7958, -1); //City hall Entrance
AddStaticPickup(1318, 1, 390.7699,173.8530,1008.3828, -1); //City hall Outside
AddStaticPickup(1318, 1, 1928.57690, -1776.29700, 13.38460, -1); //24/7
AddStaticPickup(1318, 1, -59.19220, -110.08820, 1003.18982, -1); //24/7
AddStaticPickup(1318, 1, 314.29739, -222.96030, 999.42902, -1); //AmmuInterior
AddStaticPickup(1318, 1, 1368.99939, -1279.85181, 13.44020, -1); //Ammu
AddStaticPickup(1318, 1, 2400.49390, -1982.02234, 13.34370, -1); //Ammu
AddStaticPickup(1318, 1, 1939.8470, -2115.9707, 13.6261, -1); //Sexshop main entrance el corona
AddStaticPickup(1318, 1, -100.37490, -25.22250, 1000.48407, -1); //In interior Sex shop
AddStaticPickup(1318, 1, 418.59811, -84.45220, 1001.61591, -1); //Barber Interior
AddStaticPickup(1318, 1, 2070.59839, -1793.83801, 13.39730, -1); //Barber Entrance - Idlewood
AddStaticPickup(1318, 1, 824.13550, -1588.12292, 13.39820, -1); //Barber Entrance - Market
AddStaticPickup(1318, 1, 377.0945, -193.5336, 1000.2264, -1);//Donuts shop - Interior
AddStaticPickup(1318, 1, 1038.1476, -1340.8574, 13.3843, -1);//Donuts shop
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/enter", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1172.0773,-1323.4209,15.4032))
{
SetPlayerPos(playerid, -204.5060,-1736.0486,675.7687);//HospitalEntrance
SetPlayerInterior(playerid, 3);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1928.57690, -1776.29700, 13.38460))
{
SetPlayerPos(playerid, 390.7699,173.8530,1008.3828);//24/7 Entrance
SetPlayerInterior(playerid, 3);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1481.0745,-1772.3140,18.7958))
{
SetPlayerPos(playerid, 390.7699,173.8530,1008.3828);//City Hall Entrance
SetPlayerInterior(playerid, 4);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2105.7077, -1806.5243, 13.1974))
{
SetPlayerPos(playerid, 372.3692, -133.8471, 1001.0909);//Pizza Entrance
SetPlayerInterior(playerid, 5);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1368.99939, -1279.85181, 13.44020))
{
SetPlayerPos(playerid, 314.29739, -222.96030, 999.42902);//Ammu1 Entrance Market
SetPlayerInterior(playerid, 6);
SetPlayerVirtualWorld(playerid, 2);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2400.49390, -1982.02234, 13.34370))
{
SetPlayerPos(playerid, 314.29739, -222.96030, 999.42902);//Ammu2 Entrance Willowfield
SetPlayerInterior(playerid, 6);
SetPlayerVirtualWorld(playerid, 3);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1939.8470, -2115.9707, 13.6261))
{
SetPlayerPos(playerid, -100.37490, -25.22250, 1000.48407);//SexShop Entrance El corona
SetPlayerInterior(playerid, 3);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2070.59839, -1793.83801, 13.39730))
{
SetPlayerPos(playerid, 418.59811, -84.45220, 1001.61591);//Barber Entrance Idlewood
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 2);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 824.13550, -1588.12292, 13.39820))
{
SetPlayerPos(playerid, 418.59811, -84.45220, 1001.61591);//Barber Entrance Market
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 3);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1038.1476, -1340.8574, 13.3843))
{
SetPlayerPos(playerid, 377.0945, -193.5336, 1000.2264);//Donuts Entrance Market
SetPlayerInterior(playerid, 17);
}
}
if(!strcmp(cmdtext, "/exit", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -204.5060,-1736.0486,675.7687))
{
SetPlayerPos(playerid, 1172.0773,-1323.4209,15.4032);//HospitalExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 377.0945, -193.5336, 1000.2264))
{
SetPlayerPos(playerid, 1038.1476, -1340.8574, 13.3843);//DonutsExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 390.7699,173.8530,1008.3828))
{
SetPlayerPos(playerid, 1481.0745,-1772.3140,18.7958);//City hall Exit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 372.3692, -133.8471, 1001.0909))
{
SetPlayerPos(playerid, 2105.7077, -1806.5243, 13.1974);//PizzaExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, -59.19220, -110.08820, 1003.18982))
{
SetPlayerPos(playerid, 1928.57690, -1776.29700, 13.38460);//24/7 Exit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, -100.37490, -25.22250, 1000.484072))
{
SetPlayerPos(playerid, 1939.8470, -2115.9707, 13.6261);//Sexshop Exit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 418.59811, -84.45220, 1001.61591))
{
if(GetPlayerVirtualWorld(playerid) == 2)
{
SetPlayerPos(playerid, 2070.59839, -1793.83801, 13.39730);//BarberExit
}
else if(GetPlayerVirtualWorld(playerid) == 3)
{
SetPlayerPos(playerid, 824.13550, -1588.12292, 13.39820);//BarberExit
}
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 314.29739, -222.96030, 999.42902))
{
if(GetPlayerVirtualWorld(playerid) == 2)
{
SetPlayerPos(playerid, 1368.99939, -1279.85181, 13.44020);//AmmuExit
}
else if(GetPlayerVirtualWorld(playerid) == 3)
{
SetPlayerPos(playerid, 2400.49390, -1982.02234, 13.34370);//Ammu2Exit
}
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
}
return 1;
}