- 0
problema intrare in business si iesire.
-
Similar Content
-
Problema turf
By Soryn.,
- 2 answers
- 212 views
-
- 1 reply
- 167 views
-
Problema
By ImJustSlim,
- 3 answers
- 279 views
-
- 2 replies
- 152 views
-
- 1 answer
- 297 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
Sprite_RoPlayers
Buna ziua.
Am si eu urmatoarea problema
cand intru intrun business si ies ma da la alt business in loc la iesirea care trebuie.
intru la banca la ls ma trezesc la biz-ul din sf cand ies.
for(new i = 1; i < sizeof(BizzInfo); i++) { if (IsPlayerInRangeOfPoint(playerid,2,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) && GetPlayerVirtualWorld(playerid) == 0) { if(BizzInfo[i][bSbiz] != 0) return 0; if(GetPlayerCash(playerid) >= BizzInfo[i][bEntranceCost]) { if(BizzInfo[i][bLocked] == 1) { SendClientMessage(playerid, COLOR_GREY, "This business is locked."); if(IsACop(playerid)) { BreachID[playerid] = i; ShowPlayerDialog(playerid, DIALOG_RAMBIZ, DIALOG_STYLE_MSGBOX, "SERVER: Businesses", "This business is locked.\nAs a law enforcement officer, you can breach this door and enter. Would you like to do so?", "Yes", "No"); } if(PlayerInfo[playerid][pMember] == 11) { BreachID[playerid] = i; ShowPlayerDialog(playerid, DIALOG_RAMBIZ, DIALOG_STYLE_MSGBOX, "SERVER: Businesses", "This business is locked.\nAs a hitman, you can breach this door and enter. Would you like to do so?", "Yes", "No"); } return 1; } if(LastBiz[playerid] != i) { GivePlayerCash(playerid,-BizzInfo[i][bEntranceCost]); BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost]; format(string,sizeof(string),"~r~-$%d",BizzInfo[i][bEntranceCost]); GameTextForPlayer(playerid, string, 5000, 1); LastBizTime[playerid] = 60; } else { GameTextForPlayer(playerid, "welcome back", 5000, 1); } LastBiz[playerid] = i; if(BizzInfo[i][bType] == 3) { if(strlen(barstring[i][playerid]) > 0) { StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid, barstring[i]); } } if(BizzInfo[i][bType] == 1) { SS(playerid,COLOR_GREEN3,"Inselatoriile (tepele) nu sunt permise pe server. Pentru orice incercare de a insela un player cu bunuri/bani puteti primi ban permanent.", "Scamming is not allowed! Any attempt of scamming can result in getting your account permanent banned."); SS(playerid,COLOR_GREEN3,"Imprumuturile de orice fel (inclusiv datoriile) se fac pe proprie raspundere. Nu ai nicio garantie ca ii vei recupera.", "Keep in mind that if you loan money to other players, you have no guarantee that you'll receive them back."); SS(playerid,COLOR_GREEN3,"Afacerile cu bani reali nu sunt permise. Se pedepseste cu ban 7-14 zile la prima abatere si ban permanent la urmatoarea abatere.", "Selling in-game goods/money for real money/goods is not allowed."); SCM(playerid,COLOR_WHITE,"Welcome! The commands of this business are as follows: /deposit, /withdraw, /balance, /transfer"); } else if(BizzInfo[i][bType] == 2) { SCM(playerid,COLOR_WHITE,"Welcome to the gun shop! The commands of this business are as follows: /buygun"); } else if(BizzInfo[i][bType] == 3) { SCM(playerid,COLOR_WHITE,"Welcome! The commands of this business are as follows: /buydrink"); } else if(BizzInfo[i][bType] == 4) { SCM(playerid,COLOR_WHITE,"Welcome to the sex shop! The commands of this business are as follows: /buytoys"); } else if(BizzInfo[i][bType] == 5) { SCM(playerid,COLOR_WHITE,"Welcome! The commands of this business are as follows: /dice, /blackjack"); } else if(BizzInfo[i][bType] == 6) { SCM(playerid,COLOR_WHITE,"Welcome! The commands of this business are as follows: /buy"); if(PlayerInfo[playerid][pFishPrice] != 0) { ShowPlayerDialog(playerid, DIALOG_SELLFISH, DIALOG_STYLE_MSGBOX, "Sell fish", "Do you want to sell the fish you are carying?", "Yes", "No"); } } else if(BizzInfo[i][bType] == 7 || BizzInfo[i][bType] == 14) { SCM(playerid,COLOR_WHITE,"Welcome! The commands of this business are as follows: /buyfood"); if(AreFaina[playerid] > 0) { new money,faina = AreFaina[playerid]; if(SvarInfo[2][svValue] == 0) money = faina * 1000 + random(5000); else money = faina * 1200 + random(5000); PlayerInfo[playerid][pFarmTimes]++; PlayerInfo[playerid][pFarmRem]--; if(PlayerInfo[playerid][pQuest2] == 5) { if(PlayerInfo[playerid][pQuestNeed2] > PlayerInfo[playerid][pQuestProgress2]) { PlayerInfo[playerid][pQuestProgress2] += faina; Update(playerid, pQuestProgress2x); if(PlayerInfo[playerid][pQuestProgress2] >= PlayerInfo[playerid][pQuestNeed2]) { FinishQuest2(playerid, 5); } else { new str[128]; if(PlayerInfo[playerid][pLanguage] == 1) { format(str, sizeof(str),"Quest [Sell %d KG of flour] progress: %d/%d",PlayerInfo[playerid][pQuestNeed2],PlayerInfo[playerid][pQuestProgress2],PlayerInfo[playerid][pQuestNeed2]); SendClientMessage(playerid, COLOR_YELLOW, str); } else { format(str, sizeof(str),"Progres pentru misiunea [Vinde %d KG de faina]: %d/%d",PlayerInfo[playerid][pQuestNeed2],PlayerInfo[playerid][pQuestProgress2],PlayerInfo[playerid][pQuestNeed2]); SendClientMessage(playerid, COLOR_YELLOW, str); } } } } AreFaina[playerid] = 0; GivePlayerCash(playerid, money); if(PlayerInfo[playerid][pClan]!=0) { new safestring[128]; ClanInfo[PlayerInfo[playerid][pClan]][cClanSeif]+=money/10; ClanUpdate(PlayerInfo[playerid][pClan], ClanSafex); PlayerInfo[playerid][pClanDep]+=money/10; Update(playerid, pClanDepx); format(safestring,sizeof(safestring), "(Clan Safe){FFFFFF} After your work %s$ was added in clan safe.",FormatNumber(money/10)); SendClientMessage(playerid,COLOR_GREEN,safestring); } Update(playerid, pCashx); Update(playerid, pFarmTimesx); Update(playerid, pFarmRemx); new stringe[128]; if(PlayerInfo[playerid][pFarmSkill] <= 5) { if(PlayerInfo[playerid][pFarmRem] <= 0) { PlayerInfo[playerid][pFarmSkill]++; if(PlayerInfo[playerid][pFarmSkill] == 2) { PlayerInfo[playerid][pFarmRem] = 34; } else if(PlayerInfo[playerid][pFarmSkill] == 3) { PlayerInfo[playerid][pFarmRem] = 49; } else if(PlayerInfo[playerid][pFarmSkill] == 4) { PlayerInfo[playerid][pFarmRem] = 89; } else if(PlayerInfo[playerid][pFarmSkill] == 5) { PlayerInfo[playerid][pFarmRem] = 99; } Update(playerid,pFarmSkillx); Update(playerid,pFarmRemx); format(string,sizeof(string),"Felicitari! Ai acum skill %d pentru acest job!",PlayerInfo[playerid][pFarmSkill]); format(stringe,sizeof(stringe),"Congratulations! Now you have skill %d for this job!",PlayerInfo[playerid][pFarmSkill]); SS(playerid, COLOR_YELLOW, string, stringe); } } format(string,sizeof(string),"(+) Ai vandut un sac de faina pentru $%s.", FormatNumber(money)); format(stringe,sizeof(stringe),"(+) You sold a bag of flour for $%s.", FormatNumber(money)); SS(playerid, COLOR_GREEN, string, stringe); } } else if(BizzInfo[i][bType] == 8) { SCM(playerid,COLOR_WHITE,"Welcome! The commands of this business are as follows: /buyfightstyle"); } else if(BizzInfo[i][bType] == 9) { SCM(playerid,COLOR_WHITE,"Welcome! The commands of this business are as follows: /buyfood"); } else if(BizzInfo[i][bType] == 11) { SCM(playerid,COLOR_WHITE,"Welcome! The commands of this business are as follows: /buyaccs /clothes"); } SetPlayerInterior(playerid,BizzInfo[i][bInterior]); SetPlayerPosEx(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]); PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior]; PlayerInfo[playerid][pLocal] = i+99; SetPlayerVirtualWorld(playerid,BizzInfo[i][bVirtual]); InBussines[playerid] = i; Update(playerid, pCashx); new str1[184]; mysql_format(SQL,str1,sizeof(str1),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[i][bTill],i); mysql_tquery(SQL,str1,"",""); } else { GameTextForPlayer(playerid, "you don't have enough money", 5000, 1); } } }
folosesc gm-ul bizone bulufs
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.