Jump to content
  • 0

Problema puncte rob


iulian24

Question

Salut , am si eu o problema, ideea e ca atunci cand dau rob merge totul perfect , pana la puncte am setat ca daca esti premium sa ai nevoie de 8 puncte si non premium 10 , dar am pus dupa rob sa fie PlayerInfo[playerid][pRob] = 0; dar nu vreau sa le seteze pe 0 ca daca omu are 20/20 si nu are premium , da rob , ar mai trebui sa aiba 10/20 

asa ca am incercat unknown.png

 

am incercat asa cat si PlayerInfo[playerid][pRob] -= 10 respectiv -=8 , iar cand intru in joc  , si am 20/20 puncte rob, dau /rob , si in loc sa mai am 10 pentru ca nu am premium sau 12 daca am , imi apare la /stats ceva de genu -13320/20 sau alt numar dinacesta mare , negativ.

 

Stiti cumva unde ar putea fi problema?

Link to comment
Share on other sites

23 answers to this question

Recommended Posts

  • 0
Acum 1 oră, iulian24 a spus:

-13320/20 sau alt

ai asa ca asa te-a fost setat contul intra in baza de date si trece la o valoarea la rob punctes sau cum ai tu

Edited by Geani

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
Acum 7 minute, iulian24 a spus:

Nu, nu e de la asta, toata lumea care da /rob , li se seteaza un numar dinacesta mare , negativ

daca folosesti acum mai nou gamemod-ul Funny RPG intradevar iti da un cod care il testez  in tabelul respectiv, retine nu iti da niciun cp ca asa este creat systemul

 

 

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
Acum 8 minute, iulian24 a spus:

Si cum as putea sa il rezolv totusi?

 

esti belea nu ai un pic de cultura in tine :))) pui asa la [pRob] -= 10; si cunt premium [pRob] -= 8;

  • Upvote 1

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0

eu ce te-am dat nu este o eroare este un ajutor acum nu mai stiu ce ai facut tu

si ce fel de eroare persista asa de tare?

Edited by Geani

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0

if(PlayerInfo[playerid][pPremiumAccount] == 0) 

{

          PlayerInfo[playerid][pRob] -= 10;

}

else if (PlayerInfo[playerid][pPremiumAccount) ==1)

{

          PlayerInfo[playerid][pRob] -= 8;

}

 

Asta am facut eu inainte, apoi mi-ai zis si tu acelasi lucru sa fac, si cand dau rob nu imi ia 10 sau 8 din cate am , ci imi seteaza -16023/20 (sau alt numar random dinaceasta mare , negativ)

Edited by iulian24
Link to comment
Share on other sites

  • 0

nu inteleg ce eroare iti da din asta             if(PlayerInfo[playerid][pPremiumAccount] == 0)
            {
                PlayerInfo[playerid][pRob] -= 10;
            }
            else if(PlayerInfo[playerid][pPremiumAccount] == 1)
            {
                PlayerInfo[playerid][pRob] -= 8;
            }

sau tu ai rezolvat si vrei up?

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0

CMD:rob(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need level 3 to do this.");
    if(PlayerInfo[playerid][pWantedLevel] > 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You can't rob a business when you have wanted.");
    if(PlayerInfo[playerid][pRob] >= 10 && PlayerInfo[playerid][pPremiumAccount] == 0 || PlayerInfo[playerid][pRob] >= 8 && PlayerInfo[playerid][pPremiumAccount] > 0)
    {
        if(IsACop(playerid)) return SCM(playerid,COLOR_WHITE,"{FFB870}You're a cop.");
        for(new b = 1; b < sizeof(BizzInfo); b++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 50.0, 2306.5564,-16.3045,26.7496))
              {
                TogglePlayerControllable(playerid, 0);
                for(new i = 0; i < 31; i++)
                {
                    PlayerTextDrawShow(playerid, RobBank[playerid]);
                    PlayerTextDrawHide(playerid, RobBank[playerid][3]);
                    RobSecunde[playerid] = 10;
                    if(PlayerInfo[playerid][pPremiumAccount] == 0)
                    {
                        PlayerInfo[playerid][pRob] -= 10;
                    }
                    else if(PlayerInfo[playerid][pPremiumAccount] == 1)
                    {
                        PlayerInfo[playerid][pRob] -= 8;
                    }
                }
            }
            else return SendClientMessage(playerid, COLOR_WHITE, "Trebuie sa fi in interiorul banci pentru a porni un jaf.");
        }
    }
    else 
    {
        if(PlayerInfo[playerid][pPremiumAccount] == 0)
        {
            SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You don't have 10 rob points.");
        }
        else if(PlayerInfo[playerid][pPremiumAccount] == 1)
        {
            SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You don't have 8 rob points.");
        }
        return 1;
    }
    return 1;
}

Link to comment
Share on other sites

  • 0
 for(new b = 1; b < sizeof(BizzInfo); b++)
{
	if(IsPlayerInRangeOfPoint(playerid, 50.0, 2306.5564,-16.3045,26.7496))
	  {
		TogglePlayerControllable(playerid, 0);
		for(new i = 0; i < 31; i++)
		{
			PlayerTextDrawShow(playerid, RobBank[playerid]);
			PlayerTextDrawHide(playerid, RobBank[playerid][3]);
			RobSecunde[playerid] = 10;
			if(PlayerInfo[playerid][pPremiumAccount] == 0)
			{
				PlayerInfo[playerid][pRob] -= 10;
			}
			else if(PlayerInfo[playerid][pPremiumAccount] == 1)
			{
				PlayerInfo[playerid][pRob] -= 8;
			}
		}
	}
	else return SendClientMessage(playerid, COLOR_WHITE, "Trebuie sa fi in interiorul banci pentru a porni un jaf.");
}

Trebuie sa fie asa

if(IsPlayerInRangeOfPoint(playerid, 50.0, 2306.5564,-16.3045,26.7496))
{
	TogglePlayerControllable(playerid, 0);
	for(new i = 0; i < 31; i++)
	{
		PlayerTextDrawShow(playerid, RobBank[playerid]);
		PlayerTextDrawHide(playerid, RobBank[playerid][3]);
	}
	
	RobSecunde[playerid] = 10;
	if(PlayerInfo[playerid][pPremiumAccount] == 0)
	{
		PlayerInfo[playerid][pRob] -= 10;
	}
	else if(PlayerInfo[playerid][pPremiumAccount] == 1)
	{
		PlayerInfo[playerid][pRob] -= 8;
	}
	
	Update(playerid, pRobx);
}
else return SendClientMessage(playerid, COLOR_WHITE, "Trebuie sa fi in interiorul banci pentru a porni un jaf.");

Am sos acea iteratie inutila si am scos bucata de cod unde setezi punctele de rob din din acea iteratie de 31.

Link to comment
Share on other sites

  • 0

Vezi ca este definit de doua ori, incearca sa stergi if(PlayerInfo[playerid][pRob] >= 10 && PlayerInfo[playerid][pPremiumAccount] == 0 || PlayerInfo[playerid][pRob] >= 8 && PlayerInfo[playerid][pPremiumAccount] > 0)

Link to comment
Share on other sites

  • 0
CMD:rob(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need level 3 to do this.");
    if(PlayerInfo[playerid][pWantedLevel] > 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You can't rob a business when you have wanted.");
    if(PlayerInfo[playerid][pRob] >= 10 && PlayerInfo[playerid][pPremiumAccount] == 0 || PlayerInfo[playerid][pRob] >= 8 && PlayerInfo[playerid][pPremiumAccount] > 0)
    {
        if(IsACop(playerid)) return SCM(playerid,COLOR_WHITE,"{FFB870}You're a cop.");
        for(new b = 1; b < sizeof(BizzInfo); b++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 50.0, 2306.5564,-16.3045,26.7496))
            {
                TogglePlayerControllable(playerid, 0);
                PlayerTextDrawShow(playerid, RobBank[playerid]);
                PlayerTextDrawHide(playerid, RobBank[playerid][3]);
                RobSecunde[playerid] = 10;
                if(PlayerInfo[playerid][pPremiumAccount] == 0)
                {
                    PlayerInfo[playerid][pRob] -= 10;
                }
                else if(PlayerInfo[playerid][pPremiumAccount] == 1)
                {
                    PlayerInfo[playerid][pRob] -= 8;
                }
            }
        }
        else return SendClientMessage(playerid, COLOR_WHITE, "Trebuie sa fi in interiorul banci pentru a porni un jaf.");
    }
    else 
    {
        if(PlayerInfo[playerid][pPremiumAccount] == 0)
        {
            SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You don't have 10 rob points.");
        }
        else if(PlayerInfo[playerid][pPremiumAccount] == 1)
        {
            SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You don't have 8 rob points.");
        }
        return 1;
    }
    return 1;
}

EDIT: Hopa, nu am vazut ca exista 2 pagini...

Edited by RWRobiBG

                        

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.