SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Romānă/Romanian

Reply
 
Thread Tools Display Modes
Old 09/06/2014, 10:50 PM   #1
r0bi
Huge Clucker
 
Join Date: Sep 2013
Location: Romania
Posts: 228
Reputation: 1
Default Problema bizz

Salut! Am creat un sistem de bizz-uri dupa un model de case, dar problema este urmatoarea: cand vreau sa creez un bizz pe serv din comanda, se restarteaza serverul.Stie cineva care ar fi problema?

Last edited by r0bi; 10/06/2014 at 12:21 PM.
r0bi is offline   Reply With Quote
Old 10/06/2014, 12:42 PM   #2
DiGiTaL_AnGeL
High-roller
 
DiGiTaL_AnGeL's Avatar
 
Join Date: Aug 2012
Location: Romānia
Posts: 1,931
Reputation: 104
Default Re: Problema bizz

Arata comanda, nu citim in stele.
__________________

DiGiTaL_AnGeL is offline   Reply With Quote
Old 10/06/2014, 12:46 PM   #3
r0bi
Huge Clucker
 
Join Date: Sep 2013
Location: Romania
Posts: 228
Reputation: 1
Default Re: Problema bizz

PHP Code:
CMD:acreatebiz(playeridparams[])
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridRED"Nu esti logat!");
    if(
PlayerInfo[playerid][Adminlevel] < 8) return SendClientMessage(playeridRED"Ce faci ma?");
    new 
Float:x,Float:y,Float:z,string2[256];
    new 
tip,valoare,virtual;
    if(
unformat(params"iii"tip,valoare,virtual))
    {
        
SendClientMessage(playerid0xFFFFFFFF"Foloseste: /acreatebiz <model> <valoare> <virtual>>");
         return 
1;
    }
    if(!(
tip && tip 4))
    {
        
SendClientMessage(playerid0xFFFFFFFF"Modelul trebuie sa fie 1,2 sau 3!");
           return 
1;
    }
    if(!(
valoare && valoare 5000000))
    {
        
SendClientMessage(playerid0xFFFFFFFF"Valoarea trebuie cuprins intre 0 si 5000000$");
           return 
1;
    }
    
GetPlayerPos(playeridx,y,z);
    if(
IsPlayerAdmin(playerid))
    {
        for(new 
i=1;i<sizeof(AfacereInfo);i++)
        {
            new 
file[256];
            
format(filesizeof(file),"Afacere/%d.ini"i);
            if(!
dini_Exists(file))
            {
                if(
tip == 1)
                {
                    
AfacereInfo[i][Intrarex] = xAfacereInfo[i][Intrarey] = yAfacereInfo[i][Intrarez] = z;
                    
AfacereInfo[i][Virtual] = virtualAfacereInfo[i][Valoare] = valoareAfacereInfo[i][Pret] = 5000;
                    
strmid(AfacereInfo[i][Propietar], "Stat"0strlen("Stat"), MAX_PLAYER_NAME);
                    
strmid(AfacereInfo[i][Nume], "24/7"0strlen("24/7"), MAX_PLAYER_NAME);AfacereInfo[i][Cumparata] = 0AfacereInfo[i][Inchisa] = 1;
                    
AfacereInfo[i][Iesirex] = -26.691598AfacereInfo[i][Iesirey] = -55.714897AfacereInfo[i][Iesirez] = 1003.546875AfacereInfo[i][Interior] = 6;
                    
apickup[i] = CreatePickup(12741AfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], -1);
                       
format(string2sizeof(string2), "Afacere: %s\n Propietar: %s\n Pret: %d",AfacereInfo[i][Nume], AfacereInfo[i][Propietar],AfacereInfo[i][Valoare]);
                       
btextlabel[i] = Create3DTextLabel(string20x7FFF00FFAfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], 20.000);
                    
SaveThisAfacere(i);
                    break;
                }
                if(
tip == 2)
                {
                    
AfacereInfo[i][Intrarex] = xAfacereInfo[i][Intrarey] = yAfacereInfo[i][Intrarez] = z;
                    
AfacereInfo[i][Virtual] = virtualAfacereInfo[i][Valoare] = valoareAfacereInfo[i][Pret] = 5000;
                    
strmid(AfacereInfo[i][Propietar], "Stat"0strlen("Stat"), MAX_PLAYER_NAME);
                    
strmid(AfacereInfo[i][Nume], "GunShop"0strlen("GunShop"), MAX_PLAYER_NAME);AfacereInfo[i][Cumparata] = 0AfacereInfo[i][Inchisa] = 1;
                    
AfacereInfo[i][Iesirex] = 286.148986AfacereInfo[i][Iesirey] = -40.644397AfacereInfo[i][Iesirez] = 1001.515625AfacereInfo[i][Interior] = 1;
                    
apickup[i] = CreatePickup(12741AfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], -1);
                       
format(string2sizeof(string2), "Afacere: %s\n Propietar: %s\n Pret: %d",AfacereInfo[i][Nume], AfacereInfo[i][Propietar],AfacereInfo[i][Valoare]);
                       
btextlabel[i] = Create3DTextLabel(string20x7FFF00FFAfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], 20.000);
                    
SaveThisAfacere(i);
                    break;
                }
                if(
tip == 3)
                {
                    
AfacereInfo[i][Intrarex] = xAfacereInfo[i][Intrarey] = yAfacereInfo[i][Intrarez] = z;
                    
AfacereInfo[i][Virtual] = virtualAfacereInfo[i][Valoare] = valoareAfacereInfo[i][Pret] = 5000;
                    
strmid(AfacereInfo[i][Propietar], "Stat"0strlen("Stat"), MAX_PLAYER_NAME);
                    
strmid(AfacereInfo[i][Nume], "Cazino"0strlen("Cazino"), MAX_PLAYER_NAME);AfacereInfo[i][Cumparata] = 0AfacereInfo[i][Inchisa] = 1;
                    
AfacereInfo[i][Iesirex] = 2233.8032AfacereInfo[i][Iesirey] = 1712.2303AfacereInfo[i][Iesirez] = 1011.7632AfacereInfo[i][Interior] = 1;
                    
apickup[i] = CreatePickup(12741AfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], -1);
                       
format(string2sizeof(string2), "Afacere: %s\n Propietar: %s\n Pret: %d",AfacereInfo[i][Nume], AfacereInfo[i][Propietar],AfacereInfo[i][Valoare]);
                       
btextlabel[i] = Create3DTextLabel(string20x7FFF00FFAfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], 20.000);
                    
SaveThisAfacere(i);
                    break;
                }
            }
        }
    }
    return 
1;

r0bi is offline   Reply With Quote
Old 10/06/2014, 07:50 PM   #4
r0bi
Huge Clucker
 
Join Date: Sep 2013
Location: Romania
Posts: 228
Reputation: 1
Default Re: Problema bizz

Scuze pentrul dublu post doar poate fi vreo problema si in acest public?
PHP Code:
public SaveThisAfacere(afacereid)
{
    new 
file2[254];
    
format(file2sizeof(file2),"Afacere/%d.ini"afacereid);
    if(
dini_Exists(file2))
    {
        
dini_FloatSet(file2,"Intrarex",AfacereInfo[afacereid][Intrarex]);
        
dini_FloatSet(file2,"Intrarey",AfacereInfo[afacereid][Intrarey]);
        
dini_FloatSet(file2,"Intrarez",AfacereInfo[afacereid][Intrarez]);
        
dini_FloatSet(file2,"Iesirex",AfacereInfo[afacereid][Iesirex]);
        
dini_FloatSet(file2,"Iesirey",AfacereInfo[afacereid][Iesirey]);
        
dini_FloatSet(file2,"Iesirez",AfacereInfo[afacereid][Iesirez]);
        
dini_IntSet(file2,"Valoare",AfacereInfo[afacereid][Valoare]);
        
dini_Set(file2,"Propietar",AfacereInfo[afacereid][Propietar]);
        
dini_Set(file2,"Nume",AfacereInfo[afacereid][Nume]);
        
dini_IntSet(file2,"Seif",AfacereInfo[afacereid][Seif]);
        
dini_IntSet(file2,"Cumparata",AfacereInfo[afacereid][Cumparata]);
        
dini_IntSet(file2,"Inchisa",AfacereInfo[afacereid][Inchisa]);
        
dini_IntSet(file2,"Pret",AfacereInfo[afacereid][Pret]);
        return 
1;
    }
    else if(!
dini_Exists(file2))
    {
         
dini_Create(file2);
           
dini_FloatSet(file2,"Intrarex",AfacereInfo[afacereid][Intrarex]);
        
dini_FloatSet(file2,"Intrarey",AfacereInfo[afacereid][Intrarey]);
        
dini_FloatSet(file2,"Intrarez",AfacereInfo[afacereid][Intrarez]);
        
dini_FloatSet(file2,"Iesirex",AfacereInfo[afacereid][Iesirex]);
        
dini_FloatSet(file2,"Iesirey",AfacereInfo[afacereid][Iesirey]);
        
dini_FloatSet(file2,"Iesirez",AfacereInfo[afacereid][Iesirez]);
        
dini_IntSet(file2,"Valoare",AfacereInfo[afacereid][Valoare]);
        
dini_Set(file2,"Propietar",AfacereInfo[afacereid][Propietar]);
        
dini_Set(file2,"Nume",AfacereInfo[afacereid][Nume]);
        
dini_IntSet(file2,"Seif",AfacereInfo[afacereid][Seif]);
        
dini_IntSet(file2,"Cumparata",AfacereInfo[afacereid][Cumparata]);
        
dini_IntSet(file2,"Inchisa",AfacereInfo[afacereid][Inchisa]);
        
dini_IntSet(file2,"Pret",AfacereInfo[afacereid][Pret]);
        return 
1;
    }
    return 
1;

r0bi is offline   Reply With Quote
Old 13/06/2014, 03:54 PM   #5
RoW001
Little Clucker
 
Join Date: Jul 2012
Posts: 42
Reputation: 4
Default Re: Problema bizz

Pune o variabila globala care sa retina ultimul id al bizz-ului.
si faci asa in loc de loopu ala.
Code:
CMD:acreatebiz(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, RED, "Nu esti logat!");
	if(PlayerInfo[playerid][Adminlevel] < 8) return SendClientMessage(playerid, RED, "Ce faci ma?");
	new Float:x,Float:y,Float:z,string2[256];
	new tip,valoare,virtual;
	if(unformat(params, "iii", tip,valoare,virtual))
		return SendClientMessage(playerid, 0xFFFFFFFF, "Foloseste: /acreatebiz <model> <valoare> <virtual>>");
	
	if(!(tip > 0 && tip < 4))
		return SendClientMessage(playerid, 0xFFFFFFFF, "Modelul trebuie sa fie 1,2 sau 3!");
	
	if(!(valoare > 0 && valoare < 5000000))
		return SendClientMessage(playerid, 0xFFFFFFFF, "Valoarea trebuie cuprins intre 0 si 5000000$");
	
	GetPlayerPos(playerid, x,y,z);
	new i = VariabilaCareRetineIDU + 1;
    VariabilaCareRetineIDU = i;

	if(IsPlayerAdmin(playerid))
	{
		if(tip == 1)
		{
			AfacereInfo[i][Intrarex] = x; AfacereInfo[i][Intrarey] = y; AfacereInfo[i][Intrarez] = z;
			AfacereInfo[i][Virtual] = virtual; AfacereInfo[i][Valoare] = valoare; AfacereInfo[i][Pret] = 5000;
			strmid(AfacereInfo[i][Propietar], "Stat", 0, strlen("Stat"), MAX_PLAYER_NAME);
			strmid(AfacereInfo[i][Nume], "24/7", 0, strlen("24/7"), MAX_PLAYER_NAME);AfacereInfo[i][Cumparata] = 0; AfacereInfo[i][Inchisa] = 1;
			AfacereInfo[i][Iesirex] = -26.691598; AfacereInfo[i][Iesirey] = -55.714897; AfacereInfo[i][Iesirez] = 1003.546875; AfacereInfo[i][Interior] = 6;
			apickup[i] = CreatePickup(1274, 1, AfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], -1);
			format(string2, sizeof(string2), "Afacere: %s\n Propietar: %s\n Pret: %d",AfacereInfo[i][Nume], AfacereInfo[i][Propietar],AfacereInfo[i][Valoare]);
			btextlabel[i] = Create3DTextLabel(string2, 0x7FFF00FF, AfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], 20.0, 0, 0);
			SaveThisAfacere(i);
		}
		if(tip == 2)
		{
			AfacereInfo[i][Intrarex] = x; AfacereInfo[i][Intrarey] = y; AfacereInfo[i][Intrarez] = z;
			AfacereInfo[i][Virtual] = virtual; AfacereInfo[i][Valoare] = valoare; AfacereInfo[i][Pret] = 5000;
			strmid(AfacereInfo[i][Propietar], "Stat", 0, strlen("Stat"), MAX_PLAYER_NAME);
			strmid(AfacereInfo[i][Nume], "GunShop", 0, strlen("GunShop"), MAX_PLAYER_NAME);AfacereInfo[i][Cumparata] = 0; AfacereInfo[i][Inchisa] = 1;
			AfacereInfo[i][Iesirex] = 286.148986; AfacereInfo[i][Iesirey] = -40.644397; AfacereInfo[i][Iesirez] = 1001.515625; AfacereInfo[i][Interior] = 1;
			apickup[i] = CreatePickup(1274, 1, AfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], -1);
			format(string2, sizeof(string2), "Afacere: %s\n Propietar: %s\n Pret: %d",AfacereInfo[i][Nume], AfacereInfo[i][Propietar],AfacereInfo[i][Valoare]);
			btextlabel[i] = Create3DTextLabel(string2, 0x7FFF00FF, AfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], 20.0, 0, 0);
			SaveThisAfacere(i);
		}
		if(tip == 3)
		{
			AfacereInfo[i][Intrarex] = x; AfacereInfo[i][Intrarey] = y; AfacereInfo[i][Intrarez] = z;
			AfacereInfo[i][Virtual] = virtual; AfacereInfo[i][Valoare] = valoare; AfacereInfo[i][Pret] = 5000;
			strmid(AfacereInfo[i][Propietar], "Stat", 0, strlen("Stat"), MAX_PLAYER_NAME);
			strmid(AfacereInfo[i][Nume], "Cazino", 0, strlen("Cazino"), MAX_PLAYER_NAME);AfacereInfo[i][Cumparata] = 0; AfacereInfo[i][Inchisa] = 1;
			AfacereInfo[i][Iesirex] = 2233.8032; AfacereInfo[i][Iesirey] = 1712.2303; AfacereInfo[i][Iesirez] = 1011.7632; AfacereInfo[i][Interior] = 1;
			apickup[i] = CreatePickup(1274, 1, AfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], -1);
			format(string2, sizeof(string2), "Afacere: %s\n Propietar: %s\n Pret: %d",AfacereInfo[i][Nume], AfacereInfo[i][Propietar],AfacereInfo[i][Valoare]);
			btextlabel[i] = Create3DTextLabel(string2, 0x7FFF00FF, AfacereInfo[i][Intrarex], AfacereInfo[i][Intrarey], AfacereInfo[i][Intrarez], 20.0, 0, 0);
			SaveThisAfacere(i);
		}
	}
	return 1;
}
Si schimba "VariabilaCareRetineIDU" cu numele variabilei pe care ai creeato.
RoW001 is offline   Reply With Quote
Old 14/06/2014, 09:06 AM   #6
r0bi
Huge Clucker
 
Join Date: Sep 2013
Location: Romania
Posts: 228
Reputation: 1
Default Re: Problema bizz

Am rezolvat! Multumesc!
r0bi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bizz FS help me yaron0600 Scripting Help 0 01/04/2013 09:41 AM
Bizz Help [REP ++] teomakedonija Scripting Help 0 14/01/2013 12:34 AM
Problema casa/bizz/masini/teritorii myhaitza97 Romānă/Romanian 1 18/09/2012 08:32 AM
Problema case/bizz/masini myhaitza97 Romānă/Romanian 1 16/09/2012 05:12 PM
A little help for bizz luis_mendoza Help Archive 17 09/08/2011 11:04 AM


All times are GMT. The time now is 11:49 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.