24.07.2010, 05:23
I cant enter and place like fbi and stuff
Код:
if(strcmp(cmd, "/enter", true) == 0) { if(IsPlayerConnected(playerid)) { for(new i = 0; i < sizeof(HouseInfo); i++) { if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez])) { //printf("Found House :%d",i); if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0) { SetPlayerInterior(playerid,HouseInfo[i][hInt]); SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]); GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1); PlayerInfo[playerid][pInt] = HouseInfo[i][hInt]; PlayerInfo[playerid][pLocal] = i; } else { GameTextForPlayer(playerid, "~r~Locked", 5000, 1); } } } for(new i = 0; i < sizeof(HouseInfo); i++) { if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ])) { //printf("Found House :%d",i); if(!IsACop(playerid) && i == 3) { SendClientMessage(playerid, COLOR_GREY, " Cops only !"); return 1; } if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost]) { if(PlayerInfo[playerid][pPbiskey] != i) { if(BizzInfo[i][bLocked] == 1) { GameTextForPlayer(playerid, "~r~Closed", 5000, 3); return 1; } if(BizzInfo[i][bProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 3); return 1; } GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]); format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]); BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost]; ExtortionBiz(i, BizzInfo[i][bEntranceCost]); BizzInfo[i][bProducts]--; OnPropUpdate(); GameTextForPlayer(playerid, string, 5000, 3); } SetPlayerInterior(playerid,BizzInfo[i][bInterior]); SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]); PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior]; PlayerInfo[playerid][pLocal] = i+99; new dood[MAX_PLAYER_NAME]; GetPlayerName(playerid, dood, sizeof(dood)); format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i); printf("%s", string); PayLog(string); //PlayerInfo[playerid][pLocal] = i; } else { GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 3); } } } for(new i = 0; i < sizeof(SBizzInfo); i++) { if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ])) { if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost]) { if(PlayerInfo[playerid][pPbiskey] != i) { if(SBizzInfo[i][sbLocked] == 1) { GameTextForPlayer(playerid, "~r~Closed", 5000, 3); return 1; } if(SBizzInfo[i][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 3); return 1; } if(i == 10) { PaintballPlayers ++; PlayerPaintballing[playerid] = 1; new rand = random(sizeof(PaintballSpawns)); SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]); TogglePlayerControllable(playerid, 0); } else if(i == 11) { SendClientMessage(playerid, TEAM_GROVE_COLOR, "You can now parcipitate in a Karting Race, grab a Kart."); } else { return 1; } GivePlayerMoney(playerid,-SBizzInfo[0][sbEntranceCost]); gSpentCash[playerid] = GetPlayerMoney(playerid); SBizzInfo[i][sbProducts]--; SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost]; ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]); new dood[MAX_PLAYER_NAME]; GetPlayerName(playerid, dood, sizeof(dood)); format(string, sizeof(string), "%s payed $%d to enter sbiz %d", dood, SBizzInfo[i][sbEntranceCost], i); printf("%s", string); PayLog(string); OnPropUpdate(); } } else { GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1); } } if(PlayerToPoint(8.0, playerid,1172.0834,-1325.5232,15.4078)) {//Hospital GameTextForPlayer(playerid, "~r~All Saints", 5000, 6); SetPlayerInterior(playerid, 6); SetPlayerVirtualWorld(playerid, 1); SetPlayerPos(playerid,1169.1206,-1330.0065,1386.4193); } else if(PlayerToPoint(8.0, playerid,1368.6711,-1279.9377,13.5469)) {//Ammunation GameTextForPlayer(playerid, "~r~Ammunation", 5000, 1); SendClientMessage(playerid, COLOR_GREEN, " Goto the checkpoint and do /gun"); SetPlayerCheckpoint(playerid, 307.9722,-141.4586,999.6016, 2); GunStore[playerid] = 1; SetPlayerInterior(playerid, 7); SetPlayerVirtualWorld(playerid, 1); SetPlayerPos(playerid,314.820983,-141.431991,999.601562); } else if(PlayerToPoint(8.0, playerid,2081.3047,2829.7400,-16.1744)) {//Hospital door 2 GameTextForPlayer(playerid, "~r~Garage", 5000, 6); SetPlayerInterior(playerid, 1); SetPlayerVirtualWorld(playerid, 1); SetPlayerPos(playerid,1425.9532,-2438.2498,-10.8973); } else if(PlayerToPoint(8.0, playerid,1425.8643,-2437.5854,-11.6056)) {//Hospital door GameTextForPlayer(playerid, "~r~All Saints", 5000, 6); SetPlayerInterior(playerid, 1); SetPlayerVirtualWorld(playerid, 1); SetPlayerPos(playerid,2081.9600,2825.2571,-16.1744); } else if(PlayerToPoint(8.0, playerid,1141.1561,-1326.0602,13.7542)) {//LSMD Garage new vehicleid; vehicleid = GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid, vehicleid)) { if(gTeam[playerid] == 4 || PlayerInfo[playerid][pMember] == 4) { GameTextForPlayer(playerid, "~w~LSMD Garage", 5000, 3); SetVehiclePos(vehicleid,1426.6069,-2447.9255,-11.4563); SetVehicleZAngle(vehicleid, 1.4557); SetPlayerInterior(playerid, 1); SetPlayerVirtualWorld(playerid, 1); } else { SendClientMessage(playerid, COLOR_RED, " * You are not a Medic !"); } } else { SendClientMessage(playerid, COLOR_RED, "* You are not in a vehicle !"); } } else if(PlayerToPoint(8.0, playerid,1318.1403,-1183.3582,23.5939)) {//Driving School GameTextForPlayer(playerid, "~w~License Department", 5000, 3); SetPlayerInterior(playerid, 3); SetPlayerVirtualWorld(playerid, 1); SetPlayerPos(playerid,-2029.5632,-117.7680,1035.1719); SendClientMessage(playerid, COLOR_GREEN, "Goto the desk and type /getlic"); } else if(PlayerToPoint(8.0, playerid,1310.2178,-1367.0743,13.5184)) {//Paintball GameTextForPlayer(playerid, "Paintball", 5000, 3); SetPlayerInterior(playerid, 10); GivePlayerWeapon(playerid, 29, 99999); GivePlayerWeapon(playerid, 24, 99999); GivePlayerWeapon(playerid, 31, 99999); GivePlayerWeapon(playerid, 34, 99999); SendClientMessage(playerid, COLOR_GREEN, "Welcome to Paintball"); PaintballPlayers ++; PlayerPaintballing[playerid] = 1; new rand = random(sizeof(PaintballSpawns)); SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]); } else if(PlayerToPoint(8.0, playerid,1153.8212,-1180.8107,32.8187)) {//FBI HQ GameTextForPlayer(playerid, "~b~FBI", 5000, 3); SetPlayerInterior(playerid, 3); SetPlayerVirtualWorld(playerid, 1); SetPlayerPos(playerid,238.7272,142.0942,1003.0234); } else if(PlayerToPoint(8.0, playerid,690.7601,-1275.9617,13.5601)) {//Ryans HQ GameTextForPlayer(playerid, "~g~American Alcatraz HQ", 5000, 3); SetPlayerInterior(playerid, 1); SetPlayerVirtualWorld(playerid, 1); SetPlayerPos(playerid,2233.8706,1711.2141,1011.4486); } else if(PlayerToPoint(8.0, playerid,1059.5522,-345.2047,73.9922)) {//Methlab enterace GameTextForPlayer(playerid, "~b~Blue Magic lab", 5000, 3); SetPlayerInterior(playerid, 1); SetPlayerVirtualWorld(playerid, 5); SetPlayerFacingAngle(playerid, 85.6876); SetPlayerPos(playerid,963.5632,2159.4895,1011.0303); } /* if(PlayerToPoint(2.0, playerid,1107.6245,-316.3203,74.7422))//Shack { SetPlayerPos(playerid, -2666.9397,632.9147,66.1670); SetPlayerVirtualWorld(playerid, 9); SetPlayerInterior(playerid, 1); return 1; } */ else if(PlayerToPoint(2.0, playerid,870.2368,-25.2136,63.9689))//Hitman HQ Entrance { SetPlayerPos(playerid, -2171.0400,645.4891,1057.5938); SetPlayerVirtualWorld(playerid, 99); SetPlayerInterior(playerid, 1); return 1; } else if(PlayerToPoint(3.0, playerid,-2162.2554,-2385.9541,30.6250)) { SetPlayerInterior(playerid,3); SetPlayerPos(playerid,387.7978,173.8582,1008.3828); GameTextForPlayer(playerid, "~w~Welcome to the City Hall", 5000, 3); PlayerInfo[playerid][pInt] = 3; PlayerInfo[playerid][pLocal] = 241; } else if (PlayerToPoint(3.0, playerid,1219.4858,-1812.9700,16.5938)) //Bounty Hunter Entrance { SetPlayerInterior(playerid,1); SetPlayerPos(playerid,-2159.122802,641.517517,1052.381713); GameTextForPlayer(playerid, "~w~Bounty Hunter HQ", 5000, 3); PlayerInfo[playerid][pInt] = 3; PlayerInfo[playerid][pLocal] = 241; } else if (PlayerToPoint(3.0, playerid,2232.5249,-1333.3073,23.9816)) //Church Entrance { SetPlayerInterior(playerid,1); SetPlayerPos(playerid,-2029.798339,-106.675910,1035.171875); GameTextForPlayer(playerid, "~w~Los Santos Church", 5000, 3); PlayerInfo[playerid][pInt] = 3; PlayerInfo[playerid][pLocal] = 241; } else if (PlayerToPoint(3.0, playerid,1022.3154,-1122.6476,23.8707)) //Sam Mafia Entrance { SetPlayerInterior(playerid,1); SetPlayerPos(playerid,452.489990,-18.179698,1001.132812); GameTextForPlayer(playerid, "~w~Mafia HQ", 5000, 3); PlayerInfo[playerid][pInt] = 3; PlayerInfo[playerid][pLocal] = 241; } else if (PlayerInfo[playerid][pLeader] == 1 && PlayerToPoint(5, playerid,1827.9487,-1538.7544,13.1849) || PlayerInfo[playerid][pMember] == 1 && PlayerToPoint(5, playerid,1827.9487,-1538.7544,13.1849)) {//prison if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, 1818.1245,-1536.7389,13.0869); SetVehicleZAngle(tmpcar, 83.1812); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else { SetPlayerPos(playerid, 1818.1245,-1536.7389,13.0869); } GameTextForPlayer(playerid,"~w~Los Santos Prison~n~~r~Restricted Area", 5000, 3); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid, 83.1812); PlayerInfo[playerid][pInt] = 0; } else if (PlayerInfo[playerid][pLeader] == 1 && PlayerToPoint(10, playerid,2175.0847,-995.0397,62.9756) && PlayerInfo[playerid][pRank] >= 4 || PlayerInfo[playerid][pMember] == 1 && PlayerToPoint(10, playerid,2175.0847,-995.0397,62.9756) && PlayerInfo[playerid][pRank] >= 4) {//safehouse enter if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetCarPassWorld(tmpcar, 89); SetCarPassInterior(tmpcar, 1); SetVehiclePos(tmpcar, 2207.4109,1551.8469,1007.5931); SetVehicleZAngle(tmpcar, 270); SetPlayerVirtualWorld(playerid, 89); LinkVehicleToInterior(tmpcar, 1); SetVehicleVirtualWorld(tmpcar, 89); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else { SetPlayerPos(playerid, 2207.4109,1551.8469,1007.5931); } GameTextForPlayer(playerid,"~w~Safe House~n~~r~Restricted Area", 5000, 3); SetPlayerInterior(playerid,1); PlayerInfo[playerid][pLocal] = 102; SetPlayerFacingAngle(playerid, 270); PlayerInfo[playerid][pInt] = 1; SetPlayerVirtualWorld(playerid, 89); } else if (PlayerToPoint(3.0, playerid,1073.0619,-344.5148,73.9922)) { if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) { SetPlayerInterior(playerid,2); SetPlayerPos(playerid,1205.0947,-10.1685,1000.9219); PlayerInfo[playerid][pInt] = 2; PlayerInfo[playerid][pLocal] = 242; } } else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438)) { GameTextForPlayer(playerid, "~w~Welcome to the 8ball Track", 5000, 3); SetPlayerInterior(playerid,7); SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563); } else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344)) { GameTextForPlayer(playerid, "~w~Welcome to the Dirt Track", 5000, 3); SetPlayerInterior(playerid,4); SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472); } else if (PlayerToPoint(8.0, playerid,-2170.3408, 635.3967, 1052.3750)) // HITMAN DOJO { GameTextForPlayer(playerid, "~w~Welcome to Ghost's Dojo", 5000, 3); SetPlayerInterior(playerid,6); SetPlayerPos(playerid, 774.213989, -48.924297, 1000.585937); } else if (PlayerToPoint(8.0, playerid,-2158.4851,642.6509,1052.3750)) // HITMAN CRACK LAB { GameTextForPlayer(playerid, "~r~Ghost's Rapage Room", 5000, 3); SetPlayerInterior(playerid,6); SetPlayerPos(playerid, 346.870025,309.259033,999.155700); } else if (PlayerToPoint(8.0, playerid,756.4841,-17.1075,1000.5859)) // HITMAN Meat Factory { GameTextForPlayer(playerid, "~r~The Factory", 5000, 3); SetPlayerInterior(playerid,1); SetPlayerPos(playerid, 963.418762,2108.292480,1011.030273); } else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344)) { GameTextForPlayer(playerid, "~w~Welcome to the Stunting Track", 5000, 3); SetPlayerInterior(playerid,14); SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313); } else if (PlayerToPoint(8.0, playerid,1772.0234,-1548.0089,9.9072))// Prison { GameTextForPlayer(playerid, "~r~Welcome to the Prison", 5000, 3); SetPlayerInterior(playerid, 3); SetPlayerFacingAngle(playerid, 178.3951); SetPlayerPos(playerid,1790.5304,-1532.8323,-14.7619); } else if (PlayerToPoint(8.0, playerid,1797.9257,-1578.9176,14.0912))//Prison { if(gTeam[playerid] == 2 || IsACop(playerid)) { SetPlayerInterior(playerid, 1); SetPlayerFacingAngle(playerid, 266.1816); SetPlayerPos(playerid,1765.4119,-1540.6046,-14.7936); SetPlayerVirtualWorld(playerid, 1); } } } return 1; }