Originally Posted by The Voice Of Britain!
I have the single player enters and exits disabled. I have a system now that when you stand on the Icon it puts you inside the building... I would like to make it so that there is a timer, that way when the player steps on the icon it will have a 5 to 10 second timer before putting them inside. Sorry about the way I put this, I'm not the best at describing something so simple.
Basically just make it so there is a timer for when the player enters and exits buildings so that the player doesn't get sucked out/in over and over again. |
forward teleporting();//Global Variable
//where you checks player is in checkpoint or not
SetTimer("teleporting",5000, false);//5000 = 5 seconds
public teleporting()
{
for(new i=0 ; i<MAX_PLAYERS; i++)
{
SetPlayerPos(i , x, y, z);
}
Originally Posted by The Voice Of Britain!
Okay where do I put the "SetTimer"?
|
Originally Posted by _Saif_
Quote:
|
public CheckForWalkingTeleport(playerid) // only put teleports ON FOOT here, use another function for vehicle ones - luk0r { /* * HOW TO USE THIS FUNCTION: * * Just use your normal PlayerToPoint functions but make them use PlayerToPointStripped instead. * Use the arguments cx,cy,cz at the end of each call (look at the others for an example). * */ new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); if(PlayerToPointStripped(1, playerid,1554.9537,-1675.6584,16.1953, cx,cy,cz)) {//LSPD Entrance SetPlayerInterior(playerid, 6); SetPlayerPos(playerid,246.7079,66.2239,1003.6406); PlayerInfo[playerid][pInt] = 6; } else if(PlayerToPointStripped(1, playerid,246.5325,62.4251,1003.6406, cx,cy,cz)) {//LSPD Exit SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1552.3231,-1674.6780,16.1953); PlayerInfo[playerid][pInt] = 0; } else if (PlayerToPointStripped(1.0, playerid,488.2531,-82.7632,998.7578, cx,cy,cz)) { //Misty/10 Green Toilets SetPlayerPos(playerid,2277.5942,-1139.8883,1050.8984); SetPlayerInterior(playerid,11); PlayerInfo[playerid][pInt] = 11; } else if (PlayerToPointStripped(2.0, playerid,2280.0476,-1139.5413,1050.8984, cx,cy,cz)) { //Misty/10 Green Toilets SetPlayerPos(playerid,490.9059,-81.4256,998.7578); SetPlayerInterior(playerid,11); PlayerInfo[playerid][pInt] = 11; } else if (PlayerToPointStripped(1.0, playerid,1462.3958,-1012.3912,26.8438, cx,cy,cz)) { //BANK SetPlayerPos(playerid,2307.5417,-15.9974,26.7496); } else if (PlayerToPointStripped(2.0, playerid,2305.6890,-16.0881,26.7496, cx,cy,cz)) { //BANK SetPlayerPos(playerid,1462.2904,-1013.8757,26.7845); } else if(PlayerToPointStripped(1, playerid,1352.1194,-1759.2534,13.5078, cx,cy,cz)) {//24/7 near PD Entrance SetPlayerInterior(playerid, 6); SetPlayerPos(playerid,-26.6916,-55.7149,1003.5469); PlayerInfo[playerid][pInt] = 6; } else if(PlayerToPointStripped(1, playerid,-27.3919,-58.2529,1003.5469, cx,cy,cz)) {//24/7 near PD Exit SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1352.3282,-1755.4298,13.3542); PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,1833.6124,-1842.4968,13.5781, cx,cy,cz)) {//24/7 near 8-ball entrance SetPlayerInterior(playerid, 18); SetPlayerPos(playerid,-30.9467,-89.6096,1003.5469); PlayerInfo[playerid][pInt] = 18; } else if(PlayerToPointStripped(1, playerid,-30.9299,-92.0114,1003.5469, cx,cy,cz)) {//24/7 near 8-ball exit if(GetPlayerVirtualWorld(playerid) == 0) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1831.5413,-1843.3785,13.5781); PlayerInfo[playerid][pInt] = 0; } else if(GetPlayerVirtualWorld(playerid) == 2) { SetPlayerVirtualWorld(playerid, 0); PlayerInfo[playerid][pVirWorld] = 0; SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1315.7769,-901.4099,39.5781); PlayerInfo[playerid][pInt] = 0; } } else if(PlayerToPointStripped(1, playerid,1315.4581,-897.6843,39.5781, cx,cy,cz)) {//24/7 vinewood SetPlayerVirtualWorld(playerid, 2); PlayerInfo[playerid][pVirWorld] = 2; SetPlayerInterior(playerid, 18); SetPlayerPos(playerid,-30.9467,-89.6096,1003.5469); PlayerInfo[playerid][pInt] = 18; } else if(PlayerToPointStripped(1, playerid,1836.4064,-1682.4403,13.3493, cx,cy,cz)) {//Alhambra Entrance SetPlayerInterior(playerid, 17); SetPlayerPos(playerid,493.3891,-22.7212,1000.6797); PlayerInfo[playerid][pInt] = 17; } else if(PlayerToPointStripped(1, playerid,493.4393,-24.9169,1000.6719, cx,cy,cz)) {//Alhambra Exix SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1834.4000,-1681.7500,13.4331); PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,2310.0183,-1643.4669,14.8270, cx,cy,cz)) {//10 green SetPlayerInterior(playerid, 11); SetPlayerPos(playerid,502.0531,-70.2137,998.7578); PlayerInfo[playerid][pInt] = 11; } else if(PlayerToPointStripped(1, playerid,501.8708,-67.5820,998.7578, cx,cy,cz)) {//Some teleports are fucked up but they are working SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2307.0027,-1645.2213,14.6882); OnPlayerExitFood(playerid); // ? PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,2244.3423,-1665.5542,15.4766, cx,cy,cz)) {//Binco next to 10 green SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /clothes to change your outfit"); SetPlayerInterior(playerid, 15); SetPlayerPos(playerid,207.7336,-108.6231,1005.1328); PlayerInfo[playerid][pInt] = 15; } else if(PlayerToPointStripped(1, playerid,207.7662,-111.2663,1005.1328, cx,cy,cz)) {//Some teleports are fucked up but they are working SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2245.2778,-1661.1738,15.4690); OnPlayerExitFood(playerid); // ? PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,2229.9011,-1721.2582,13.5613, cx,cy,cz)) {//Ganton Gym SetPlayerInterior(playerid, 5); SetPlayerPos(playerid,771.9399,-2.2574,1000.7292); PlayerInfo[playerid][pInt] = 5; } else if(PlayerToPointStripped(1, playerid,772.3594,-5.5157,1000.7286, cx,cy,cz)) {//Some teleports are fucked up but they are working SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2225.6699,-1725.3134,13.5586); OnPlayerExitFood(playerid); // ? PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,2421.4998,-1219.2438,25.5617, cx,cy,cz)) {//Pigpen SetPlayerInterior(playerid, 2); SetPlayerPos(playerid,1205.0803,-9.9519,1000.9219); PlayerInfo[playerid][pInt] = 2; } else if(PlayerToPointStripped(1, playerid,1204.8462,-13.8521,1000.9219, cx,cy,cz)) {//Some teleports are fucked up but they are working SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2419.5559,-1226.5612,24.9379); OnPlayerExitFood(playerid); // ? PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,2419.9941,-1509.5865,24.0000, cx,cy,cz)) {//Cluckin Bell near pigpen OnPlayerEnterFood(playerid, 1); } else if(PlayerToPointStripped(1, playerid,364.0594,-11.7518,1001.8516, cx,cy,cz)) {//Some teleports are fucked up but they are working if(GetPlayerVirtualWorld(playerid) == 0) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2423.8145,-1510.2896,23.9922); PlayerInfo[playerid][pInt] = 0; }//cluckin bell near 10 green else if(GetPlayerVirtualWorld(playerid) == 2) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2398.5508,-1894.6324,13.3828); SetPlayerVirtualWorld(playerid, 0); PlayerInfo[playerid][pVirWorld] = 0; PlayerInfo[playerid][pInt] = 0; }//cluckin bell marina else if(GetPlayerVirtualWorld(playerid) == 1) { SetPlayerVirtualWorld(playerid, 0); PlayerInfo[playerid][pVirWorld] = 0; SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,923.8998,-1352.9694,13.3768); PlayerInfo[playerid][pInt] = 0; } OnPlayerExitFood(playerid); // ? return 1; } else if(PlayerToPointStripped(1, playerid,2398.6240,-1899.2014,13.5469, cx,cy,cz)) {//Cluckin Bell near 10 green SetPlayerVirtualWorld(playerid, 2); PlayerInfo[playerid][pVirWorld] = 2; OnPlayerEnterFood(playerid, 1); } else if(PlayerToPointStripped(1, playerid,810.4849,-1616.2451,13.5469, cx,cy,cz)) {//Marina Burger shot OnPlayerEnterFood(playerid, 2); } else if(PlayerToPointStripped(1, playerid,362.8835,-75.1787,1001.5078, cx,cy,cz)) {//Some teleports are fucked up but they are working if(GetPlayerVirtualWorld(playerid) == 0) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,815.5034,-1616.7700,13.7521); PlayerInfo[playerid][pInt] = 0; } else if(GetPlayerVirtualWorld(playerid) == 1)// vinewood burger shot { SetPlayerVirtualWorld(playerid, 0); PlayerInfo[playerid][pVirWorld] = 0; SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1200.8680,-921.9525,43.0104); PlayerInfo[playerid][pInt] = 0; } OnPlayerExitFood(playerid); return 1; } else if(PlayerToPointStripped(1, playerid,928.9110,-1352.9958,13.3438, cx,cy,cz)) {//Marina Cluckin bell SetPlayerVirtualWorld(playerid, 1); PlayerInfo[playerid][pVirWorld] = 1; OnPlayerEnterFood(playerid, 1); } else if(PlayerToPointStripped(1, playerid,1199.2477,-918.1447,43.1233, cx,cy,cz)) {//Vinewood Burger shot SetPlayerVirtualWorld(playerid, 1); PlayerInfo[playerid][pVirWorld] = 1; OnPlayerEnterFood(playerid, 2); } else if(PlayerToPointStripped(1, playerid,1000.5861,-919.8832,42.3281, cx,cy,cz)) {//24/7 gas station SetPlayerInterior(playerid, 4); SetPlayerPos(playerid,-28.2619,-26.2015,1003.5573); PlayerInfo[playerid][pInt] = 4; } else if(PlayerToPointStripped(1, playerid,-28.0241,-31.7674,1003.5573, cx,cy,cz)) {//Some teleports are fucked up but they are working SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,994.6481,-920.7285,42.1797); OnPlayerExitFood(playerid); // ? PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,227.5614,-7.3146,1002.2109, cx,cy,cz)) {//Some teleports are fucked up but they are working SetPlayerVirtualWorld(playerid, 0); PlayerInfo[playerid][pVirWorld] = 0; SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,454.5949,-1500.6449,30.8821); OnPlayerExitFood(playerid); // ? PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,203.5140,-202.2578,1.5781, cx,cy,cz)) {//Pizzaboy SetPlayerVirtualWorld(playerid, 2); PlayerInfo[playerid][pVirWorld] = 2; OnPlayerEnterFood(playerid, 3); } else if(PlayerToPointStripped(1, playerid,372.3847,-133.5248,1001.4922, cx,cy,cz)) {//Some teleports are fucked up but they are working if(GetPlayerVirtualWorld(playerid) == 2) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,203.2209,-204.6613,1.5781); OnPlayerExitFood(playerid); // ? PlayerInfo[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); PlayerInfo[playerid][pVirWorld] = 0; } else { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2099.9783,-1806.4928,13.5547); OnPlayerExitFood(playerid); // ? PlayerInfo[playerid][pInt] = 0; } } else if(PlayerToPointStripped(1, playerid,2105.4858,-1806.4725,13.5547, cx,cy,cz)) {//Pizzaboy OnPlayerEnterFood(playerid, 3); } else if (PlayerToPointStripped(2.0, playerid,-2441.9749,754.0135,35.1786, cx,cy,cz)) { //24-7 SetPlayerPos(playerid, -25.1326,-139.0670,1003.5469); SetPlayerInterior(playerid,16); PlayerInfo[playerid][pInt] = 16; } else if (PlayerToPointStripped(2.0, playerid,-25.1326,-141.0670,1003.5469, cx,cy,cz)) { //24-7 SetPlayerPos(playerid, -2441.9749,752.0135,35.1786); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; } else if (PlayerToPointStripped(1, playerid,1298.7075,-798.5981,84.1406, cx,cy,cz)) { //Madd dog crip enter SetPlayerPos(playerid, 1254.3436,-789.3809,1084.0078); SetPlayerInterior(playerid,5); PlayerInfo[playerid][pInt] = 5; } else if (PlayerToPointStripped(1, playerid,1252.5208,-789.2282,1084.0078, cx,cy,cz)) { //Madd dog crip exit SetPlayerPos(playerid, 1298.6263,-801.5491,84.1406); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; } else if (PlayerToPointStripped(1, playerid,1038.0298,-1339.9967,13.7361, cx,cy,cz)) { //Jim's sticky ring OnPlayerEnterFood(playerid, 4); } else if (PlayerToPointStripped(1, playerid,377.1724,-193.3045,1000.6328, cx,cy,cz)) { //Jim's sticky ring SetPlayerPos(playerid, 1038.5148,-1338.0944,13.7266); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid, 0); PlayerInfo[playerid][pInt] = 0; OnPlayerExitFood(playerid); } else if (PlayerToPointStripped(1, playerid,2495.3481,-1691.1355,14.7656, cx,cy,cz)) { //Grove Enter SetPlayerPos(playerid, 2496.0061,-1693.5201,1014.7422); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid, 181); PlayerInfo[playerid][pInt] = 3; } else if (PlayerToPointStripped(1, playerid,2496.0039,-1692.2004,1014.7422, cx,cy,cz)) { //Grove Exit SetPlayerPos(playerid, 2495.3718,-1688.8561,14.0673); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid, 1); PlayerInfo[playerid][pInt] = 0; } else if (PlayerToPointStripped(1, playerid,1684.8292,-2098.9238,13.8343, cx,cy,cz)) { //Vagos HQ Enter SetPlayerPos(playerid, 2365.1167,-1132.5222,1050.8750); SetPlayerInterior(playerid,8); SetPlayerFacingAngle(playerid, 359.6150); PlayerInfo[playerid][pInt] = 8; } else if (PlayerToPointStripped(1, playerid,2365.2568,-1135.0605,1050.8750, cx,cy,cz)) { //Vagos HQ Exit SetPlayerPos(playerid, 1684.9207,-2101.9624,13.8343); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid, 181.8083); PlayerInfo[playerid][pInt] = 0; } else if (PlayerToPointStripped(1, playerid,1191.2615,-1653.0870,13.9224, cx,cy,cz)) { //Aztacas HQ Enter SetPlayerPos(playerid, -2636.7522,1406.7993,906.4609); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid, 359.6150); PlayerInfo[playerid][pInt] = 3; } else if (PlayerToPointStripped(1, playerid,-2636.4868,1402.8762,906.4609, cx,cy,cz)) { //Aztacas HQ Exit SetPlayerPos(playerid, 1191.2959,-1657.4995,13.8276); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid, 180.5334); PlayerInfo[playerid][pInt] = 0; } else if (PlayerToPointStripped(1, playerid,224.7892,69.2125,1005.0391, cx,cy,cz)) { //Intox SetPlayerPos(playerid, 230.1463,67.5748,1005.0391); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid, 90); PlayerInfo[playerid][pInt] = 6; } else if (PlayerToPointStripped(1, playerid,227.5482,67.5310,1005.0391, cx,cy,cz)) { //Intox SetPlayerPos(playerid, 225.0220,71.9732,1005.0391); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid, 179); PlayerInfo[playerid][pInt] = 6; } else if (PlayerToPointStripped(1, playerid,1481.0206,-1771.1138,18.7958, cx,cy,cz)) { //City hall SetPlayerPos(playerid, 386.2978,173.8582,1008.3828); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid, 0); PlayerInfo[playerid][pInt] = 3; } else if (PlayerToPointStripped(1, playerid,390.0630,173.5741,1008.3828, cx,cy,cz)) { //City hall SetPlayerPos(playerid, 1481.0206,-1769.5138,18.7958); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid, 0); PlayerInfo[playerid][pInt] = 0; } else if (PlayerToPointStripped(1.5, playerid,1570.3828,-1333.8882,16.4844, cx,cy,cz)) { //Next to PD building SetPlayerPos(playerid, 1545.0068,-1366.5094,327.2868); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; } else if (PlayerToPointStripped(1.5, playerid,1548.8167,-1366.2247,326.2109, cx,cy,cz)) { //Next to PD building SetPlayerPos(playerid, 1572.1115,-1332.5288,16.4844); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; } return 1; }
public teleporting() { for(new i=0 ; i<MAX_PLAYERS; i++) { SetPlayerPos(i , x, y, z); }
public teleporting()
{
for(new i=0 ; i<MAX_PLAYERS; i++)//thats for everyone who will be in the range of that icon
{
SetPlayerPos(i , Float:X, Float:y , Float:z); //this floats are position which you want to set after 5 seconds
}
Originally Posted by _Saif_
Quote:
pawn Код:
pawn Код:
pawn Код:
|