Jump to content

Razvan Eternity

Membru
  • Posts

    145
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by Razvan Eternity

  1. 1 minute ago, Exaton said:

    new HouseInfo[MAX_HOUSES][hInfo],

    Am uitat sa copiez iar codu, ia-l:

     

    public LoadProperty()
    {
        housess = cache_num_rows();
        for(new i = 0; i <= housess; i++)
        {
            new h = i - 1;
            HouseInfo[hID]                           = cache_get_field_content_int(h, "ID");
               HouseInfo[hEntrancex]                    = cache_get_field_content_float(h, "Entrancex");
            HouseInfo[hEntrancey]                    = cache_get_field_content_float(h, "Entrancey");
            HouseInfo[hEntrancez]                    = cache_get_field_content_float(h, "Entrancez");
            HouseInfo[hExitx]                        = cache_get_field_content_float(h, "Exitx");
            HouseInfo[hExity]                        = cache_get_field_content_float(h, "Exity");
            HouseInfo[hExitz]                        = cache_get_field_content_float(h, "Exitz");
            cache_get_field_content(h, "Owner", HouseInfo[hOwner], SQL, 130);
            cache_get_field_content(h, "Discription", HouseInfo[hDiscription], SQL, 130);
            HouseInfo[hValue]                        = cache_get_field_content_int(h, "Value");
            HouseInfo[hPrice]                        = cache_get_field_content_int(h, "Prices");
            HouseInfo[hHel]                          = cache_get_field_content_int(h, "Hel");
            HouseInfo[hMusic]                        = cache_get_field_content_int(h, "Music");
            HouseInfo[hInterior]                     = cache_get_field_content_int(h, "Interior");
            HouseInfo[hInteriorType]                 = cache_get_field_content_int(h, "InteriorType");
            HouseInfo[hLock]                         = cache_get_field_content_int(h, "Lockk");
            HouseInfo[hOwned]                        = cache_get_field_content_int(h, "Owned");
            HouseInfo[hRent]                         = cache_get_field_content_int(h, "Rent");
            HouseInfo[hRentabil]                     = cache_get_field_content_int(h, "Rentabil");
            HouseInfo[hTakings]                      = cache_get_field_content_int(h, "Takings");
            HouseInfo[hLevel]                        = cache_get_field_content_int(h, "Level");
            HouseInfo[hVirtual]                      = cache_get_field_content_int(h, "Virtual");
            
               /*Incep garajele*/
            HouseInfo[gExtX]                        = cache_get_field_content_float(h, "gExtX");
            HouseInfo[gExtY]                        = cache_get_field_content_float(h, "gExtY");
            HouseInfo[gExtZ]                        = cache_get_field_content_float(h, "gExtZ");
            HouseInfo[gAngel]                       = cache_get_field_content_float(h, "gAngel");
            HouseInfo[hgaraj]                       = cache_get_field_content_int(h, "garaj");
            HouseInfo[gSlot]                        = cache_get_field_content_int(h, "gSlot");
        }
        for(new i = 1; i <= housess; i++)
        {
            OnPropTextdrawUpdate(1, i);
        }
        printf("[LOADING] %d houses loaded.", housess);
        printf("[LOADING] %d turfs loaded.", turfsss);
    }

  2. 1 minute ago, Exaton said:

    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17326) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17327) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17328) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17329) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17330) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17331) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17332) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17335) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17336) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17337) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17338) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17339) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17340) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17341) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17342) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17343) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17344) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17345) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17346) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17347) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17350) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17351) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17352) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17353) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17354) : error 033: array must be indexed (variable "HouseInfo")
    C:\Users\User\Desktop\exaton\gamemodes\test2\gamemodes\ExtremeGame.pwn(17355) : error 033: array must be indexed (variable "HouseInfo")

    Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


    26 Errors.
     

    Da-mi linia cu new HouseInfo

  3. 1 hour ago, Exaton said:

    deci mai ma ajuta cineva cu problema?

    Codul corect: 

     

    public LoadProperty()
    {
        housess = cache_num_rows();
        for(new i = 0; i <= housess; i++)
        {
            new h = i - 1;
            HouseInfo[hID]                           = cache_get_field_content_int(h, "ID");
               HouseInfo[hEntrancex]                    = cache_get_field_content_float(h, "Entrancex");
            HouseInfo[hEntrancey]                    = cache_get_field_content_float(h, "Entrancey");
            HouseInfo[hEntrancez]                    = cache_get_field_content_float(h, "Entrancez");
            HouseInfo[hExitx]                        = cache_get_field_content_float(h, "Exitx");
            HouseInfo[hExity]                        = cache_get_field_content_float(h, "Exity");
            HouseInfo[hExitz]                        = cache_get_field_content_float(h, "Exitz");
            cache_get_field_content(h, "Owner", HouseInfo[hOwner], SQL, 130);
            cache_get_field_content(h, "Discription", HouseInfo[hDiscription], SQL, 130);
            HouseInfo[hValue]                        = cache_get_field_content_int(h, "Value");
            HouseInfo[hPrice]                        = cache_get_field_content_int(h, "Prices");
            HouseInfo[hHel]                          = cache_get_field_content_int(h, "Hel");
            HouseInfo[hMusic]                        = cache_get_field_content_int(h, "Music");
            HouseInfo[hInterior]                     = cache_get_field_content_int(h, "Interior");
            HouseInfo[hInteriorType]                 = cache_get_field_content_int(h, "InteriorType");
            HouseInfo[hLock]                         = cache_get_field_content_int(h, "Lockk");
            HouseInfo[hOwned]                        = cache_get_field_content_int(h, "Owned");
            HouseInfo[hRent]                         = cache_get_field_content_int(h, "Rent");
            HouseInfo[hRentabil]                     = cache_get_field_content_int(h, "Rentabil");
            HouseInfo[hTakings]                      = cache_get_field_content_int(h, "Takings");
            HouseInfo[hLevel]                        = cache_get_field_content_int(h, "Level");
            HouseInfo[hVirtual]                      = cache_get_field_content_int(h, "Virtual");
            
               /*Incep garajele*/
            HouseInfo[gExtX]                        = cache_get_field_content_float(h, "gExtX");
            HouseInfo[gExtY]                        = cache_get_field_content_float(h, "gExtY");
            HouseInfo[gExtZ]                        = cache_get_field_content_float(h, "gExtZ");
            HouseInfo[gAngel]                       = cache_get_field_content_float(h, "gAngel");
            HouseInfo[hgaraj]                       = cache_get_field_content_int(h, "garaj");
            HouseInfo[gSlot]                        = cache_get_field_content_int(h, "gSlot");
        }
        for(new i = 1; i <= housess; i++)
        {
            OnPropTextdrawUpdate(1, i);
        }
        printf("[LOADING] %d houses loaded.", housess);
        printf("[LOADING] %d turfs loaded.", turfsss);
    }

  4. 7 hours ago, Exaton said:

    public LoadProperty()
    {
        housess = cache_num_rows();
        for(new i = 1; i <= housess; i++)
        {
            new h = i - 1;
            HouseInfo[hID]                           = cache_get_field_content_int(h, "ID");
               HouseInfo[hEntrancex]                    = cache_get_field_content_float(h, "Entrancex");
            HouseInfo[hEntrancey]                    = cache_get_field_content_float(h, "Entrancey");
            HouseInfo[hEntrancez]                    = cache_get_field_content_float(h, "Entrancez");
            HouseInfo[hExitx]                        = cache_get_field_content_float(h, "Exitx");
            HouseInfo[hExity]                        = cache_get_field_content_float(h, "Exity");
            HouseInfo[hExitz]                        = cache_get_field_content_float(h, "Exitz");
            cache_get_field_content(h, "Owner", HouseInfo[hOwner], SQL, 130);
            cache_get_field_content(h, "Discription", HouseInfo[hDiscription], SQL, 130);
            HouseInfo[hValue]                        = cache_get_field_content_int(h, "Value");
            HouseInfo[hPrice]                        = cache_get_field_content_int(h, "Prices");
            HouseInfo[hHel]                          = cache_get_field_content_int(h, "Hel");
            HouseInfo[hMusic]                        = cache_get_field_content_int(h, "Music");
            HouseInfo[hInterior]                     = cache_get_field_content_int(h, "Interior");
            HouseInfo[hInteriorType]                 = cache_get_field_content_int(h, "InteriorType");
            HouseInfo[hLock]                         = cache_get_field_content_int(h, "Lockk");
            HouseInfo[hOwned]                        = cache_get_field_content_int(h, "Owned");
            HouseInfo[hRent]                         = cache_get_field_content_int(h, "Rent");
            HouseInfo[hRentabil]                     = cache_get_field_content_int(h, "Rentabil");
            HouseInfo[hTakings]                      = cache_get_field_content_int(h, "Takings");
            HouseInfo[hLevel]                        = cache_get_field_content_int(h, "Level");
            HouseInfo[hVirtual]                      = cache_get_field_content_int(h, "Virtual");
            
               /*Incep garajele*/
            HouseInfo[gExtX]                        = cache_get_field_content_float(h, "gExtX");
            HouseInfo[gExtY]                        = cache_get_field_content_float(h, "gExtY");
            HouseInfo[gExtZ]                        = cache_get_field_content_float(h, "gExtZ");
            HouseInfo[gAngel]                       = cache_get_field_content_float(h, "gAngel");
            HouseInfo[hgaraj]                       = cache_get_field_content_int(h, "garaj");
            HouseInfo[gSlot]                        = cache_get_field_content_int(h, "gSlot");
        }
        for(new i = 1; i <= housess; i++)
        {
            OnPropTextdrawUpdate(1, i);
        }
        printf("[LOADING] %d houses loaded.", housess);
        printf("[LOADING] %d turfs loaded.", turfsss);
    }

    ia frt:

     

    public LoadProperty()
    {
        housess = cache_num_rows();
        for(new i = 0; i <= housess; i++)
        {
            new h = i - 1;
            HouseInfo[hID]                           = cache_get_field_content_int(h, "ID");
               HouseInfo[hEntrancex]                    = cache_get_field_content_float(h, "Entrancex");
            HouseInfo[hEntrancey]                    = cache_get_field_content_float(h, "Entrancey");
            HouseInfo[hEntrancez]                    = cache_get_field_content_float(h, "Entrancez");
            HouseInfo[hExitx]                        = cache_get_field_content_float(h, "Exitx");
            HouseInfo[hExity]                        = cache_get_field_content_float(h, "Exity");
            HouseInfo[hExitz]                        = cache_get_field_content_float(h, "Exitz");
            cache_get_field_content(h, "Owner", HouseInfo[hOwner], SQL, 130);
            cache_get_field_content(h, "Discription", HouseInfo[hDiscription], SQL, 130);
            HouseInfo[hValue]                        = cache_get_field_content_int(h, "Value");
            HouseInfo[hPrice]                        = cache_get_field_content_int(h, "Prices");
            HouseInfo[hHel]                          = cache_get_field_content_int(h, "Hel");
            HouseInfo[hMusic]                        = cache_get_field_content_int(h, "Music");
            HouseInfo[hInterior]                     = cache_get_field_content_int(h, "Interior");
            HouseInfo[hInteriorType]                 = cache_get_field_content_int(h, "InteriorType");
            HouseInfo[hLock]                         = cache_get_field_content_int(h, "Lockk");
            HouseInfo[hOwned]                        = cache_get_field_content_int(h, "Owned");
            HouseInfo[hRent]                         = cache_get_field_content_int(h, "Rent");
            HouseInfo[hRentabil]                     = cache_get_field_content_int(h, "Rentabil");
            HouseInfo[hTakings]                      = cache_get_field_content_int(h, "Takings");
            HouseInfo[hLevel]                        = cache_get_field_content_int(h, "Level");
            HouseInfo[hVirtual]                      = cache_get_field_content_int(h, "Virtual");
            
               /*Incep garajele*/
            HouseInfo[gExtX]                        = cache_get_field_content_float(h, "gExtX");
            HouseInfo[gExtY]                        = cache_get_field_content_float(h, "gExtY");
            HouseInfo[gExtZ]                        = cache_get_field_content_float(h, "gExtZ");
            HouseInfo[gAngel]                       = cache_get_field_content_float(h, "gAngel");
            HouseInfo[hgaraj]                       = cache_get_field_content_int(h, "garaj");
            HouseInfo[gSlot]                        = cache_get_field_content_int(h, "gSlot");
        }
        for(new i = 1; i <= housess; i++)
        {
            OnPropTextdrawUpdate(1, i);
        }
        printf("[LOADING] %d houses loaded.", housess);
        printf("[LOADING] %d turfs loaded.", turfsss);
    }

  5. 2 hours ago, StR_Marian said:

    ... tot ce face linia respectiva este sa vada daca jucatorul pe care il teleportezi la dmv este sau nu conectat... comanda poate functiona perfect doar ca daca nu ar exista id-ul respectiv nu primesti nici un mesaj cum ca "id-ul nu exista".

    Si este de ajuns sa lasi doar gPlayerLogged pentru ca o data ce este logat e clar ca este si conectat :)

    Daca nu ai gPlayerLogged[playerid] = 0; la onplayerdisconnect nu e deconectat.

  6. 2 hours ago, Banditul said:

    Prostie e sa verifici daca playerid este conectat, dar sa verifici daca x id este conectat este o necesitate(nu in cazul de fata) pentru ca poti avea de a face cu PlayerInfo si daca pasezi INVALID_PLAYER_ID catre PlayerInfo estee posibil sa ai de a face cu Index out of bounds si posibil crash

    Este necesar de a face o verificare daca ID este conectat.

  7. 2 hours ago, StR_Marian said:

    Nu este nevoie sa verifici daca este sau nu conectat... pentru ca in primul si in primul rand persoana daca nu este conectata nu poate sa foloseasca comenzi sau sa se foloseasca pe el :D asta e o porcarie din scripturile de acum 100 de ani :P

    Esti prea noob, poti sa te lasi. Daca nu faci aceea verificare, nu va avea pe cine sa teleporteze :| , Daca nu stii nici sa faci o comanda, e grav rau.

  8. 3 minutes ago, bogdaNNNNN said:

    Multumesc mult <3 

    A uitat sa verifice daca ID-ul este conectat, uite aici comanda:

     

    CMD:dmv(playerid, params[]){
        if(PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pHelper] < 3) return SendClientMessage(playerid, COLOR_WHITE,AdminOnly);
        new string[250];
        new id;
        if(sscanf(params, "u")) return SendClientMessage(playerid, -1, "USAGE: /dmv <id>");
    
        if(!IsPlayerConnected(id) && gPlayerLogged[id] == 1) return SCM(playerid, -1, "ERROR: Player not connected");
    
        if(IsPlayerInAnyVehicle(id))
            SetVehiclePos(GetPlayerVehicleID(id),1218.9750,-1812.7285,16.5938);
    
        if(GetPlayerState(id) == PLAYER_STATE_ONFOOT)
            SetPlayerPos(id, 1218.9750,-1812.7285,16.5938);
        
        SetPlayerInterior(id,0);
        
        return 1;
    }
  9. #include <a_samp>
    #include <zcmd>
    #include <foreach>

    #define SCM SendClientMessage
    #define SCMALL SendClientMessageToAll

    new Bulangiu[MAX_PLAYERS],
        FastGiftPoints = 0;
        
    CMD:fastgift(playerid)
    {
        if(Bulangiu[playerid] == 1) return SCM(playerid, -1, "Ai luat deja un cadou, asteapta pana reseteaza un admin.");
        if(FastGiftPoints == 0) return SCM(playerid, -1, "Sunt 0 cadouri nu este resetat fast gift-ul.");
        Bulangiu[playerid] = 1;
        if(FastGiftPoints > 0 && FastGiftPoints < 6) {

              FastGiftPoints++;

              SCM(playerid, -1, "ai luat un cadou te drq");

        }
        return 1;
    }

    CMD:resetfastgift(playerid)
    {
        foreach(new i : Player)
        {
            Bulangiu = 0;
        }
        FastGiftPoints = 1;
        SCMALL(-1, "Un admin a bagat iar Fast Gift, hai si tu /gps > Fast Gift.");
        return 1;
    }

  10. 51 minutes ago, Turbyn3. said:

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        new sendername[25];
        new string[300];
        for(new i; i < sizeof(antisqlinjection); i++)
        {
            if(strfind(inputtext, antisqlinjection, true) != -1)
            {
                new advertiser[MAX_PLAYER_NAME];
                GetPlayerName(playerid, advertiser, sizeof(advertiser));
                format(string, sizeof(string), "%s a primit kick de la AdmBot, motiv: Flood-Server", advertiser);
                SendClientMessageToAll(COLOR_LIGHTRED,string);
                Kick(playerid);
                return 1;

     

    cand dau sa caute ondialogresponse doar asta imi gaseste

    if(dialogid == DIALOG_CARBUY)

×
×
  • 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.