if(strcmp(cmd, \"/enter\", true) == 0){ if(IsPlayerConnected(playerid)){ for(new i = 0; i < sizeof(HouseInfo); i++) { if (IsPlayerInRangeOfPoint(playerid, 10,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez])) { if(HouseInfo[hLock] == 0) { SetPlayerInterior(playerid,HouseInfo[hBelso]); SetPlayerVirtualWorld(playerid,HouseInfo[hWorld]); JatekosPozicio(playerid,HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz]); PlayerInfo[playerid][pLocal] = i; PlayerInfo[playerid][pVirWorld] = HouseInfo[hWorld]; PlayerInfo[playerid][pHouseEntered] = i; PlayerInfo[playerid][pInteriorNr] = 39; Cselekves(playerid,\"bement a ház ajtaján\", 1); } else { GameTextForPlayer(playerid, \"~r~Zárva\", 5000, 1); return 1; } } } for(new i = 0; i < sizeof(BizzInfo); i++) { if (IsPlayerInRangeOfPoint(playerid, 5,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ])) { if(egyezik(PlayerName(playerid), BizzInfo[bOwner]) || GetMoney(playerid) >= BizzInfo[bEntranceCost]) { if(!egyezik(PlayerName(playerid), BizzInfo[bOwner])) { if(BizzInfo[bLocked] == 1) { GameTextForPlayer(playerid, \"~r~Closed\", 5000, 1); return 1; } if(BizzInfo[bProducts] == 0) { GameTextForPlayer(playerid, \"~r~Out Of Stock\", 5000, 1); return 1; } GiveMoney(playerid,-BizzInfo[bEntranceCost]); format(string, sizeof(string), \"~r~-%dFt~n~~w~type /exit~n~to get out\", BizzInfo[bEntranceCost]); BizzInfo[bTill] += BizzInfo[bEntranceCost]; ExtortionBiz(i, BizzInfo[bEntranceCost]); BizzInfo[bProducts]--; OnPropUpdate(2); GameTextForPlayer(playerid, string, 5000, 3); } PlayerInfo[playerid][pInteriorNr] = BizzInfo[bInteriorNr]; SetPlayerVirtualWorld(playerid,BizzInfo[bVirWorld]); SetPlayerInterior(playerid,BizzInfo[bInterior]); JatekosPozicio(playerid,BizzInfo[bExitX],BizzInfo[bExitY],BizzInfo[bExitZ]); new dood[MAX_PLAYER_NAME]; GetPlayerName(playerid, dood, sizeof(dood)); if(BizzInfo[bVirWorld] == 0 || BizzInfo[bVirWorld] == 1) { OnPlayerEnterFood(playerid, 1); } else if(BizzInfo[bVirWorld] == 2 || BizzInfo[bVirWorld] == 3) { OnPlayerEnterFood(playerid, 2); } else if(BizzInfo[bVirWorld] == 4 || BizzInfo[bVirWorld] == 5) { OnPlayerEnterFood(playerid, 3); } else if(BizzInfo[bVirWorld] == 6) { OnPlayerEnterFood(playerid, 4); } } else { GameTextForPlayer(playerid, \"~r~Nincs elég pénzed!\", 5000, 1); } } } if(IsPlayerInRangeOfPoint(playerid, 3, -2176.4485,657.5040,49.2181)) { if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); JarmuPozicio(tmpcar, -2176.4890,664.4442,50.0893); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; LinkVehicleToInterior(tmpcar, 0); SetPlayerVirtualWorld(playerid, 0); OnPlayerExitFood(playerid); } else { JatekosPozicio(playerid, -2176.4890,664.4442,50.0893); SetPlayerVirtualWorld(playerid, 0); } } else if (GetPlayerState(playerid) == 2 && JatekosHelye(3, playerid, 1643.5533,-1523.0732,13.5588)) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(JatekosHelye(3, i, 1643.6934,-1516.3153,13.1927)) { SendClientMessage(playerid, COLOR_YELLOW, \"Valaki van benn! Sztem így nem kéne bemenni...\"); return 1; } }
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if(newkeys == KEY_CROUCH) { if(IsPlayerConnected(playerid)){ for(new i = 0; i < sizeof(HouseInfo); i++) { if (IsPlayerInRangeOfPoint(playerid, 10,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez])) { if(HouseInfo[hLock] == 0) { SetPlayerInterior(playerid,HouseInfo[hBelso]); SetPlayerVirtualWorld(playerid,HouseInfo[hWorld]); JatekosPozicio(playerid,HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz]); PlayerInfo[playerid][pLocal] = i; PlayerInfo[playerid][pVirWorld] = HouseInfo[hWorld]; PlayerInfo[playerid][pHouseEntered] = i; PlayerInfo[playerid][pInteriorNr] = 39; Cselekves(playerid,\"bement a ház ajtaján\", 1); } else { GameTextForPlayer(playerid, \"~r~Zárva\", 5000, 1); return 1; } } } for(new i = 0; i < sizeof(BizzInfo); i++) { if (IsPlayerInRangeOfPoint(playerid, 5,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ])) { if(egyezik(PlayerName(playerid), BizzInfo[bOwner]) || GetMoney(playerid) >= BizzInfo[bEntranceCost]) { if(!egyezik(PlayerName(playerid), BizzInfo[bOwner])) { if(BizzInfo[bLocked] == 1) { GameTextForPlayer(playerid, \"~r~Closed\", 5000, 1); return 1; } if(BizzInfo[bProducts] == 0) { GameTextForPlayer(playerid, \"~r~Out Of Stock\", 5000, 1); return 1; } GiveMoney(playerid,-BizzInfo[bEntranceCost]); format(string, sizeof(string), \"~r~-%dFt~n~~w~type /exit~n~to get out\", BizzInfo[bEntranceCost]); BizzInfo[bTill] += BizzInfo[bEntranceCost]; ExtortionBiz(i, BizzInfo[bEntranceCost]); BizzInfo[bProducts]--; OnPropUpdate(2); GameTextForPlayer(playerid, string, 5000, 3); } PlayerInfo[playerid][pInteriorNr] = BizzInfo[bInteriorNr]; SetPlayerVirtualWorld(playerid,BizzInfo[bVirWorld]); SetPlayerInterior(playerid,BizzInfo[bInterior]); JatekosPozicio(playerid,BizzInfo[bExitX],BizzInfo[bExitY],BizzInfo[bExitZ]); new dood[MAX_PLAYER_NAME]; GetPlayerName(playerid, dood, sizeof(dood)); if(BizzInfo[bVirWorld] == 0 || BizzInfo[bVirWorld] == 1) { OnPlayerEnterFood(playerid, 1); } else if(BizzInfo[bVirWorld] == 2 || BizzInfo[bVirWorld] == 3) { OnPlayerEnterFood(playerid, 2); } else if(BizzInfo[bVirWorld] == 4 || BizzInfo[bVirWorld] == 5) { OnPlayerEnterFood(playerid, 3); } else if(BizzInfo[bVirWorld] == 6) { OnPlayerEnterFood(playerid, 4); } } else { GameTextForPlayer(playerid, \"~r~Nincs elég pénzed!\", 5000, 1); } } } if(IsPlayerInRangeOfPoint(playerid, 3, -2176.4485,657.5040,49.2181)) { if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); JarmuPozicio(tmpcar, -2176.4890,664.4442,50.0893); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; LinkVehicleToInterior(tmpcar, 0); SetPlayerVirtualWorld(playerid, 0); OnPlayerExitFood(playerid); } else { JatekosPozicio(playerid, -2176.4890,664.4442,50.0893); SetPlayerVirtualWorld(playerid, 0); } } else if (GetPlayerState(playerid) == 2 && JatekosHelye(3, playerid, 1643.5533,-1523.0732,13.5588)) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(JatekosHelye(3, i, 1643.6934,-1516.3153,13.1927)) { SendClientMessage(playerid, COLOR_YELLOW, \"Valaki van benn! Sztem így nem kéne bemenni...\"); return 1; } }