Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/open", 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]) || PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
- {
- if(PlayerInfo[playerid][pPbiskey] == i)
- {
- if(BizzInfo[i][bLocked] == 1)
- {
- BizzInfo[i][bLocked] = 0;
- GameTextForPlayer(playerid, "~w~Biznis ~g~Otvoren", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- if(BizzInfo[i][bLocked] == 0)
- {
- BizzInfo[i][bLocked] = 1;
- GameTextForPlayer(playerid, "~w~Biznis ~r~Zatvoren", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~r~Nemate Kljuc", 5000, 6);
- return 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+100)
- {
- if(SBizzInfo[i][sbLocked] == 1)
- {
- SBizzInfo[i][sbLocked] = 0;
- GameTextForPlayer(playerid, "~w~Biznis ~g~Otvoren", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- if(SBizzInfo[i][sbLocked] == 0)
- {
- SBizzInfo[i][sbLocked] = 1;
- GameTextForPlayer(playerid, "~w~Biznis ~r~Zatvoren", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~r~Nemate Kljuc", 5000, 6);
- return 1;
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment