Jump to content

Question

8 answers to this question

Recommended Posts

  • 0
Posted

               for(new i = 1; i < sizeof(BizzInfo); i++)
               {
                   if (IsPlayerInRangeOfPoint(playerid,2,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]) && BizzInfo[bStatic] == 0)
                   {
                          if(GetPlayerVirtualWorld(playerid) != 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Trebuie sa fi in Virtual World 0 pentru a putea intra intr-un biz.");
                       if(GetPlayerCash(playerid) >= BizzInfo[bFee])
                       {
                           if(BizzInfo[bLocked] == 1)
                           {
                               GameTextForPlayer(playerid, "~r~~h~Inchis", 5000, 1);
                               return 1;
                           }
                           GivePlayerCash(playerid,-BizzInfo[bFee]);
                           BizzInfo[bBalance] += BizzInfo[bFee];
                           if(i == 1 || i == 39) SCM(playerid,COLOR_LIGHTBLUE,"Comenzi disponibile: /withdraw, /deposit, /transfer.");
                           if(i == 25 || i == 37) SCM(playerid,COLOR_LIGHTBLUE,"Comenzi disponibile: /clothes, /buyhat, /glasses.");
                           if(i == 35 || i == 28) SCM(playerid,COLOR_LIGHTBLUE,"Comenzi disponibile: /playdice.");
                           if(i == 2 || i == 36) {
                                  SCM(playerid,COLOR_GREEN,"DM-ul pe server este interzis. Este permis doar pe politisti dar se sanctioneaza cu wanted.");
                                  SCM(playerid, COLOR_GREEN, "Daca faci DM pe alti jucatori risti sa primesti jail.");
                                  SCM(playerid, COLOR_WHITE, "Poti cumpara arme apasand tasta Y in zona indicata.");
                           }       
                           if(i == 26 || i == 27 || i == 38 || i == 31)  SCM(playerid,COLOR_LIGHTBLUE,"Comenzi disponibile: /eat.");
                           if(i == 3 || i == 4 || i == 5) {
                               PlayAudioStreamForPlayer(playerid,alhamusic);
                               SCM(playerid,COLOR_LIGHTBLUE,"Comenzi disponibile: /drink.");
                           }                               
                           if(i == 20 || i == 21 || i == 22 || i == 23 || i == 24 || i == 40 || i == 41 || i == 42) {
                                 SCM(playerid,COLOR_LIGHTBLUE,"Comenzi disponibile: /buy.");
                                 if(HaveFish[playerid] != 0) {
                                    ShowPlayerDialog(playerid, DIALOG_FISH, DIALOG_STYLE_MSGBOX, "Vinde pestele", "Vrei sa vinzi pestele in acest magazin?", "Da", "Nu");
                                }
                            }    
                           if(i == 6) SCM(playerid,COLOR_LIGHTBLUE,"Comenzi disponibile: /buydildo.");                                                   
                           SetPlayerInterior(playerid,BizzInfo[bInterior]);
                           SetPlayerPosEx(playerid,BizzInfo[bExitX],BizzInfo[bExitY],BizzInfo[bExitZ]);
                           PlayerInfo[playerid][pInt] = BizzInfo[bInterior];
                           PlayerInfo[playerid][pLocal] = i+99;
                           SetPlayerVirtualWorld(playerid,BizzInfo[bVirtual]);
                           InBussines[playerid] = i;
                           Update(playerid, pCashx);
                           new str1[184];
                           format(str1,sizeof(str1),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[bBalance],i);
                           mysql_query(SQL,str1);
                           
                           format(str1, sizeof(str1), "~r~-$%d", BizzInfo[bFee]);
                           GameTextForPlayer(playerid, str1, 1000, 1);
                       }
                       else
                       {
                           GameTextForPlayer(playerid, "~r~~h~Nu ai suma necesara de bani", 5000, 1);
                       }
                   }
               }

 

 

 

 

 

 

           for(new i = 1; i <  sizeof(BizzInfo); i++)
           {
                  InBussines[playerid] = i;
               if (PlayerToPoint(2, playerid,BizzInfo[bExitX], BizzInfo[bExitY], BizzInfo[bExitZ]) && BizzInfo[bVirtual] == GetPlayerVirtualWorld(playerid))
               {
                      SetPlayerPosEx(playerid,BizzInfo[bEntranceX],BizzInfo[bEntranceY],BizzInfo[bEntranceZ]);
                   SetPlayerInterior(playerid,0);
                   PlayerInfo[playerid][pInt] = 0;
                   PlayerInfo[playerid][pLocal] = 255;
                   SetPlayerVirtualWorld(playerid,0);
                   InBussines[playerid] = -1;
               }
           }

  • 0
Posted
On 6/30/2018 at 6:30 PM, RusKo69 said:

Daca intru intr-un biz si nu ma misc ma da la intrarea lui, daca intru in el si ma misc ma da la intrarea altui biz..

Video: 

https://youtu.be/IBUgOtu9ZUs

Intra in baza de date si la "bizz" punele de la primul pana la ultimul la "VW" de la 1 pana la cate sunt, e de la VW

  • 0
Posted
Acum 2 ore, Kraim a spus:

Intra in baza de date si la "bizz" punele de la primul pana la ultimul la "VW" de la 1 pana la cate sunt, e de la VW

Le am deja asa.

  • 0
Posted

Dupa mine nu e de la niciun virtual world. E de la coordonatele folosite la functia IsPlayerInRangeOfPoint. Gen tu in baza de date la tabelul tau, pe fiecare linie pune coordonatele pentru ENTER si EXIT specifice fiecarui bizz.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.