[POMOC] Biz problem

Započeo (BV) Domy, Avgust 22, 2013, 13:17:17 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moj gmod od 0
Detaljan opis problema: Pa imam neki biz system i kad uradim 27 bizova vise nemogu, tj kad idem radit 28 pise uspjesno ste stvoriti biz 0 i stalno mi pise da sam stvorio biz 0. Zna li netko kako i gdje podesiti da mogu staviti vise bizova, hvala.
Dio skripte:
if(strcmp(cmd, "/createbiz", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_LIGHTRED, "ERROR: Niste autorizirani za koristenje ove komande - nemate dovoljan administrator level.");//Checks if player is a RCON admin..Change this with your admin system.
    new price, level, int, world, Float:Xi, Float:Yi, Float:Zi, inti;//All the new defines we will need.
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [cijena] [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [int] [izlaz X] [izlaz Y] [izlaz Z]");
price = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [cijena] [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [int] [izlaz X] [izlaz Y] [izlaz Z]");
level = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [cijena] [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [int] [izlaz X] [izlaz Y] [izlaz Z]");
inti = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [cijena] [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [int] [izlaz X] [izlaz Y] [izlaz Z]");
Xi = strvalEx(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [cijena] [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [int] [izlaz X] [izlaz Y] [izlaz Z]");
Yi = strvalEx(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [cijena] [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [int] [izlaz X] [izlaz Y] [izlaz Z]");
Zi = strvalEx(tmp);

if(level < 0 || level > 6) return SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Tip biznisa nemoze biti manji od 1 ili veci od 6.");//

    if(price < 10000) return SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Cijena biznisa nemoze biti manja od 10000$.");// Check if the price is below 1000, if it is it will return a message saying it.

    for(new h = 1;h < sizeof(BusinessInfo);h++)//Loops through all the businesses
    {
        if(BusinessInfo[h][bPrice] == 0)//Checks if the price of a business is 0.
        {
            id = h;
            break;//It stops looping if it is.
        }
    }
    new Float:X,Float:Y,Float:Z,Float:A;//More new defines.
    GetPlayerPos(playerid, X, Y, Z);//Gets your player position, and saves it into floats.
    GetPlayerFacingAngle(playerid, A);//Gets your facing angle, and saves it into a float.
    int = GetPlayerInterior(playerid);//Gets your interior, and saves it into a integer.
    world = GetPlayerVirtualWorld(playerid);//Gets your Virtual World, and saves it into a integer
    BusinessInfo[id][bInsideInt] = inti;
    BusinessInfo[id][bExitX] = Xi;
    BusinessInfo[id][bExitY] = Yi;
    BusinessInfo[id][bExitZ] = Zi;

    BusinessInfo[id][bOwned] = 0;
    BusinessInfo[id][bPrice] = price;
    BusinessInfo[id][bType] = level;
    BusinessInfo[id][bEntranceX] = X;
    BusinessInfo[id][bEntranceY] = Y;
    BusinessInfo[id][bEntranceZ] = Z;
    BusinessInfo[id][bEntranceA] = A;
    BusinessInfo[id][bLocked] = 0;

    BusinessInfo[id][bInt] = int;
    BusinessInfo[id][bWorld] = world;
    BusinessInfo[id][bInsideWorld] = id;

    if(BusinessInfo[id][bOutsideIcon]) DestroyPickup(BusinessInfo[id][bOutsideIcon]);
    BusinessInfo[id][bOutsideIcon] = CreatePickup(1272, 1, BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ], BusinessInfo[id][bWorld]);//Creates a pickup at your location
format(string, 256, "{4040FF}%s\n{4040FF}CIJENA BIZNISA: {FF0000}%d$\n{4040FF}PRITISNITE TIPKU {FF0000}'F' {4040FF}ZA ULAZ\n{4040FF}KORISTITE {FF0000}/BUYBIZ {4040FF}ZA KUPNJU", BusinessType(id), BusinessInfo[id][bPrice]);
BusinessInfo[id][bLabel] = CreateDynamic3DTextLabel(string, 0x4088F4FF, BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ], 10.0, INVALID_PLAYER_ID,INVALID_VEHICLE_ID, 1);
format(string, 256, "INFO: Uspjesno ste stvorili novi biznis (%d) na serveru - sada ga svi mogu koristiti.", id);
SCM(playerid, COLOR_LIGHTGREEN, string);
    new File4[40];
    format(File4, sizeof(File4), BPATH, id);
    new INI:File = INI_Open(File4);
    INI_SetTag(File,"data");
    INI_WriteInt(File,"bOwned", BusinessInfo[id][bOwned]);
    INI_WriteInt(File,"bPrice", BusinessInfo[id][bPrice]);
    INI_WriteString(File,"bOwner",BusinessInfo[id][bOwner]);
    INI_WriteInt(File,"bType", BusinessInfo[id][bType]);
    INI_WriteInt(File,"bLocked", BusinessInfo[id][bLocked]);
    INI_WriteInt(File,"bMoney", BusinessInfo[id][bMoney]);
    INI_WriteFloat(File,"bEntranceX", BusinessInfo[id][bEntranceX]);
    INI_WriteFloat(File,"bEntranceY", BusinessInfo[id][bEntranceY]);
    INI_WriteFloat(File,"bEntranceZ", BusinessInfo[id][bEntranceZ]);
    INI_WriteFloat(File,"bEntranceA", BusinessInfo[id][bEntranceA]);
    INI_WriteFloat(File,"bExitX", BusinessInfo[id][bExitX]);
    INI_WriteFloat(File,"bExitY", BusinessInfo[id][bExitY]);
    INI_WriteFloat(File,"bExitZ", BusinessInfo[id][bExitZ]);
    INI_WriteFloat(File,"bExitA", BusinessInfo[id][bExitA]);
    INI_WriteInt(File,"bInt", BusinessInfo[id][bInt]);
    INI_WriteInt(File,"bWorld", BusinessInfo[id][bWorld]);
    INI_WriteInt(File,"bInsideInt", BusinessInfo[id][bInsideInt]);
    INI_WriteInt(File,"bInsideWorld", BusinessInfo[id][bInsideWorld]);
    INI_Close(File);
    return 1;
    }


Neke slike/video za lakse dobivanje pomoci(neobavezno):
Poslednja Izmena: Avgust 24, 2013, 17:20:52 POSLE PODNE od Agent007


Nisam bas doobar u skriptanju tj. jos ucim, ali ja msm da se to nalazi u MAX_BIZ ili tako nesto i samo povecas jos kolko hoces... Ako nije tako izvinjavam se jos ucim :D