Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/enter", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- for(new i = 0; i < sizeof(BizzInfo); i++)
- {
- if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
- {
- 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, 1);
- return 1;
- }
- if(BizzInfo[i][bProducts] == 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- 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);
- }
- else
- {
- GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
- }
- }
- }
- 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, 1);
- return 1;
- }
- if(SBizzInfo[i][sbProducts] == 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- 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)
- {
- PlayerKarting[playerid] = 1;
- SendClientMessage(playerid, TEAM_GROVE_COLOR, "You can now parcipitate in a Karting Race, grab a Kart.");
- }
- else
- {
- return 1;
- }
- GivePlayerMoney(playerid,-SBizzInfo[i][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(InvitedToHouse[playerid] == 1)
- {
- new houseowner = InvitedToHouseOwnerId[playerid];
- new Float:housex = PlayerInfo[houseowner][pHouseX];
- new Float:housey = PlayerInfo[houseowner][pHouseY];
- new Float:housez = PlayerInfo[houseowner][pHouseZ];
- new Float:houseintx = PlayerInfo[houseowner][pHouseIntX];
- new Float:houseinty = PlayerInfo[houseowner][pHouseIntY];
- new Float:houseintz = PlayerInfo[houseowner][pHouseIntZ];
- new housevw = PlayerInfo[houseowner][pHouseVW];
- new houseint = PlayerInfo[houseowner][pHouseInt];
- new Float:px, Float:py, Float:pz;
- GetPlayerPos(playerid,px,py,pz);
- new HouseOwnerstring[MAX_PLAYER_NAME];
- GetPlayerName(houseowner, HouseOwnerstring, sizeof(HouseOwnerstring));
- if(PlayerToPoint(3.0,playerid,housex,housey,housez))
- {
- GameTextForPlayer(playerid, "~r~Welcome!", 5000, 3);
- SetPlayerPos(playerid,houseintx,houseinty,houseintz);
- SetPlayerVirtualWorld(playerid,housevw);
- SetPlayerInterior(playerid,houseint);
- }
- return 1;
- }
- new Float:vx, Float:vy, Float:vz;
- GetVehiclePos(65, vx,vy,vz);
- if (PlayerToPoint(3.0, playerid,vx,vy,vz))
- {
- GameTextForPlayer(playerid, "~y~A~p~L~g~O", 5000, 1);
- PutPlayerInVehicle(playerid,65,15);
- PlayerInfo[playerid][pLocal] = 7481;
- }
- else if (PlayerToPoint(3, playerid,1528.8412,-1678.1052,5.8906) || PlayerToPoint(3, playerid,612.7213,-590.4556,17.2330))
- {
- GameTextForPlayer(playerid, "~y~/arrest", 5000, 5);
- }
- else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
- {
- GameTextForPlayer(playerid, "~w~Welcome to the 8ball Track", 5000, 1);
- 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, 1);
- SetPlayerInterior(playerid,4);
- SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
- }
- else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
- {
- GameTextForPlayer(playerid, "~w~Welcome to the Stunting Track", 5000, 1);
- SetPlayerInterior(playerid,14);
- SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
- }
- if(PlayerInfo[playerid][pHouseX] != 0 && PlayerInfo[playerid][pHouseY] != 0 && PlayerInfo[playerid][pHouseZ] != 0)
- {
- if(PlayerInfo[playerid][pEnterHouse] == 1)
- {
- new Float:housex = PlayerInfo[playerid][pHouseX];
- new Float:housey = PlayerInfo[playerid][pHouseY];
- new Float:housez = PlayerInfo[playerid][pHouseZ];
- new Float:houseintx = PlayerInfo[playerid][pHouseIntX];
- new Float:houseinty = PlayerInfo[playerid][pHouseIntY];
- new Float:houseintz = PlayerInfo[playerid][pHouseIntZ];
- new housevw = PlayerInfo[playerid][pHouseVW];
- new houseint = PlayerInfo[playerid][pHouseInt];
- new Float:px, Float:py, Float:pz;
- GetPlayerPos(playerid,px,py,pz);
- if(PlayerToPoint(3.0,playerid,housex,housey,housez))
- {
- SetPlayerPos(playerid,houseintx,houseinty,houseintz);
- SetPlayerVirtualWorld(playerid,housevw);
- SetPlayerInterior(playerid,houseint);
- }
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/exit", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- for(new i = 0; i < sizeof(BizzInfo); i++)
- {
- if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]) && GetPlayerVirtualWorld(playerid) == 0)
- {
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
- PlayerInfo[playerid][pLocal] = 255;
- }
- }
- if(InvitedToHouse[playerid] == 1)
- {
- new houseowner = InvitedToHouseOwnerId[playerid];
- new Float:housex = PlayerInfo[houseowner][pHouseX];
- new Float:housey = PlayerInfo[houseowner][pHouseY];
- new Float:housez = PlayerInfo[houseowner][pHouseZ];
- new Float:houseintx = PlayerInfo[houseowner][pHouseIntX];
- new Float:houseinty = PlayerInfo[houseowner][pHouseIntY];
- new Float:houseintz = PlayerInfo[houseowner][pHouseIntZ];
- new housevw = PlayerInfo[houseowner][pHouseVW];
- new Float:px, Float:py, Float:pz;
- GetPlayerPos(playerid,px,py,pz);
- new HouseOwnerstring[MAX_PLAYER_NAME];
- GetPlayerName(houseowner, HouseOwnerstring, sizeof(HouseOwnerstring));
- new currentworld = GetPlayerVirtualWorld(playerid);
- if(PlayerToPoint(3.0,playerid,houseintx,houseinty,houseintz) && currentworld == housevw)
- {
- SetPlayerPos(playerid,housex,housey,housez+0.5);
- SetPlayerVirtualWorld(playerid,0);
- SetPlayerInterior(playerid,0);
- InvitedToHouse[playerid] = 0;
- }
- return 1;
- }
- if(HouseBreakin[playerid] == 1)
- {
- new houseowner = HouseBreakinOwnerId[playerid];
- new Float:housex = PlayerInfo[houseowner][pHouseX];
- new Float:housey = PlayerInfo[houseowner][pHouseY];
- new Float:housez = PlayerInfo[houseowner][pHouseZ];
- new Float:houseintx = PlayerInfo[houseowner][pHouseIntX];
- new Float:houseinty = PlayerInfo[houseowner][pHouseIntY];
- new Float:houseintz = PlayerInfo[houseowner][pHouseIntZ];
- new housevw = PlayerInfo[houseowner][pHouseVW];
- new Float:px, Float:py, Float:pz;
- GetPlayerPos(playerid,px,py,pz);
- new HouseOwnerstring[MAX_PLAYER_NAME];
- GetPlayerName(houseowner, HouseOwnerstring, sizeof(HouseOwnerstring));
- new currentworld = GetPlayerVirtualWorld(playerid);
- if(PlayerToPoint(3.0,playerid,houseintx,houseinty,houseintz) && currentworld == housevw)
- {
- SetPlayerPos(playerid,housex,housey,housez+0.5);
- SetPlayerVirtualWorld(playerid,0);
- SetPlayerInterior(playerid,0);
- HouseBreakin[playerid] = 0;
- HouseBreakinOwnerId[playerid] = 999;
- }
- return 1;
- }
- new Float:vx, Float:vy, Float:vz;
- GetVehiclePos(65, vx,vy,vz);
- if(GetPlayerVehicleID(playerid) == 65)
- {
- SetPlayerPos(playerid,vx,vy+5,vz);
- PlayerInfo[playerid][pLocal] = 255;
- }
- if(GetPlayerVehicleID(playerid) >= 71 && GetPlayerVehicleID(playerid) <= 77)
- {
- TogglePlayerControllable(playerid, 1);
- RemovePlayerFromVehicle(playerid);
- }
- else if(PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,1480.9673,-1772.0413,18.7958);
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pLocal] = 255;
- }
- else if(PlayerToPoint(3.0, playerid,322.4845,302.6965,999.1484))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,611.1556,-586.3437,17.2266);
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pLocal] = 255;
- }
- else if (PlayerToPoint(3.0, playerid,246.3196,73.8794,1003.6406)) // pd
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,1551.2357,-1675.4714,15.7592);
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pLocal] = 255;
- }
- else if (PlayerToPoint(6.0, playerid,-1404.5299,-259.0602,1043.6563))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
- }
- else if (PlayerToPoint(6.0, playerid,1169.7621,1359.1492,10.9219)) //cabs
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,2131.3894,-1150.5890,24.1359);
- }
- else if (PlayerToPoint(3.0, playerid,229.2174,1822.8274,7.4141))
- {
- if(IsACop(playerid))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,2729.9309,-2451.3738,17.5937);
- GameTextForPlayer(playerid, "~w~Welcome to LS", 5000, 1);
- PlayerInfo[playerid][pInt] = 0;
- }
- }
- else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
- }
- else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
- }
- else if(NoFuel[playerid] == 1)
- {
- TogglePlayerControllable(playerid, 1);
- RemovePlayerFromVehicle(playerid);
- NoFuel[playerid] = 0;
- }
- if(PlayerInfo[playerid][pHouseX] != 0 && PlayerInfo[playerid][pHouseY] != 0 && PlayerInfo[playerid][pHouseZ] != 0)
- {
- new Float:housex = PlayerInfo[playerid][pHouseX];
- new Float:housey = PlayerInfo[playerid][pHouseY];
- new Float:housez = PlayerInfo[playerid][pHouseZ];
- new Float:houseintx = PlayerInfo[playerid][pHouseIntX];
- new Float:houseinty = PlayerInfo[playerid][pHouseIntY];
- new Float:houseintz = PlayerInfo[playerid][pHouseIntZ];
- new housevw = PlayerInfo[playerid][pHouseVW];
- new Float:px, Float:py, Float:pz;
- GetPlayerPos(playerid,px,py,pz);
- new currentworld = GetPlayerVirtualWorld(playerid);
- if(PlayerToPoint(3.0,playerid,houseintx,houseinty,houseintz) && currentworld == housevw)
- {
- SetPlayerPos(playerid,housex,housey,housez);
- SetPlayerVirtualWorld(playerid,0);
- SetPlayerInterior(playerid,0);
- }
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement