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 [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [izlaz X] [izlaz Y] [izlaz Z]");
price = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [izlaz X] [izlaz Y] [izlaz Z]");
level = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [izlaz X] [izlaz Y] [izlaz Z]");
inti = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [izlaz X] [izlaz Y] [izlaz Z]");
Xi = strvalEx(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [izlaz X] [izlaz Y] [izlaz Z]");
Yi = strvalEx(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD,"KORISTENJE: /createbiz [tip [(1 - 24/7) (2 - AMMO) (3 - RESTORAN) (4 - BANKA) (5 - CLOTHES)] [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 == 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 = inti;
BusinessInfo = Xi;
BusinessInfo = Yi;
BusinessInfo = Zi;
BusinessInfo = 0;
BusinessInfo = price;
BusinessInfo = level;
BusinessInfo = X;
BusinessInfo = Y;
BusinessInfo = Z;
BusinessInfo = A;
BusinessInfo = 0;
BusinessInfo = int;
BusinessInfo = world;
BusinessInfo = id;
if(BusinessInfo) DestroyPickup(BusinessInfo);
BusinessInfo = CreatePickup(1272, 1, BusinessInfo, BusinessInfo, BusinessInfo, BusinessInfo);//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);
BusinessInfo = CreateDynamic3DTextLabel(string, 0x4088F4FF, BusinessInfo, BusinessInfo, BusinessInfo, 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;
format(File4, sizeof(File4), BPATH, id);
new INI:File = INI_Open(File4);
INI_SetTag(File,"data");
INI_WriteInt(File,"bOwned", BusinessInfo);
INI_WriteInt(File,"bPrice", BusinessInfo);
INI_WriteString(File,"bOwner",BusinessInfo);
INI_WriteInt(File,"bType", BusinessInfo);
INI_WriteInt(File,"bLocked", BusinessInfo);
INI_WriteInt(File,"bMoney", BusinessInfo);
INI_WriteFloat(File,"bEntranceX", BusinessInfo);
INI_WriteFloat(File,"bEntranceY", BusinessInfo);
INI_WriteFloat(File,"bEntranceZ", BusinessInfo);
INI_WriteFloat(File,"bEntranceA", BusinessInfo);
INI_WriteFloat(File,"bExitX", BusinessInfo);
INI_WriteFloat(File,"bExitY", BusinessInfo);
INI_WriteFloat(File,"bExitZ", BusinessInfo);
INI_WriteFloat(File,"bExitA", BusinessInfo);
INI_WriteInt(File,"bInt", BusinessInfo);
INI_WriteInt(File,"bWorld", BusinessInfo);
INI_WriteInt(File,"bInsideInt", BusinessInfo);
INI_WriteInt(File,"bInsideWorld", BusinessInfo);
INI_Close(File);
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
