Pretraga

Pritisnite Enter za pretragu ili Escape za zatvaranje

Zaključano

[Pomoc] BUG /BUYMATS

pre 14 godina
705
pregleda
9
postova
Ova tema je zaključana. Samo moderatori i administratori mogu odgovarati.
Jovan_Blood
Enforcer
pre 14 godina
Koji gamemod koristite?: GTARP
Koje vam se greške javljaju u skripti?: LJudiiiii Imam Bug sa Komandom /Buymats i naprimer ode neko da uzme mats kuca /buymats -3232323 i dobije 32323232 $ Kako da resim toooo molimmm vasssss
Dio skripte na kojim se javljaju greške?:
 if(strcmp(cmd,"/buymats",true)==0) // By Ellis
{
   if(IsPlayerConnected(playerid))
   {
       if(gPlayerLogged == 0)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Morate se prvo prijaviti !");
           return 1;
       }
       if(PlayerInfo != 9)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Niste diler oruzija. ");
   return 1;
       }
       if(!PlayerToPoint(2.0, playerid, 2230.3579,-2286.2107,14.3751))
       {
           SendClientMessage(playerid, COLOR_GREY, "   Niste kod Banke Materijala !");
           return 1;
       }
       tmp = strtok(cmdtext, idx);
       if(!strlen(tmp))
       {
           SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /buymats ");
           return 1;
       }
       new mammount;
       mammount = strval(tmp);
       if(mammount > matssys)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Nemaju dovoljno materijala ! ");
           return 1;
       }
if(GetPlayerMoney(playerid) < mammount * 5 - 1)
{
   SendClientMessage(playerid, COLOR_GREY, "   Nemate dovoljno novca ! ");
   return 1;
}
matssys -= mammount;
PlayerInfo += mammount;
SafeGivePlayerMoney(playerid, - mammount * 5);
format(string, sizeof(string), "   Kupili ste %d materijala za %d$ !", mammount, mammount * 5);
SendClientMessage(playerid, COLOR_GREY, string);
SaveMatsSystem();
return 1;
   }
   return 1;
}
pavle.bakun
Crime Lord
pre 14 godina
Izvini ako radis gm od 0 zasto koristis GF komande? Nemoj lagati Ako koristis GF napisi GF...
Jovan_Blood
Enforcer
pre 14 godina
A nije Od 0 To sam pogresio TO JE GTARP MOD
LordShigi
Crime Lord
pre 14 godina
GTARP = GF

Samo provjeri ako je mammount manji od 0 i ako je return 1;
Jovan_Blood
Enforcer
pre 14 godina
	 if(strcmp(cmd,"/buymats",true)==0) // By Ellis
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Morate se prvo prijaviti !");
            return 1;
        }
        if(PlayerInfo != 9)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Niste diler oruzija. ");
    return 1;
        }
        if(!PlayerToPoint(2.0, playerid, 2230.3579,-2286.2107,14.3751))
        {
            SendClientMessage(playerid, COLOR_GREY, "  Niste kod Banke Materijala !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /buymats ");
            return 1;
        }
        new mammount;
        mammount = strval(tmp);
        if(mammount > matssys)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Nemaju dovoljno materijala ! ");
            return 1;
        }
if(GetPlayerMoney(playerid) < mammount * 5 - 1)
{
    SendClientMessage(playerid, COLOR_GREY, "  Nemate dovoljno novca ! ");
    return 1;
}
matssys -= mammount;
PlayerInfo += mammount;
SafeGivePlayerMoney(playerid, - mammount * 5);
format(string, sizeof(string), "  Kupili ste %d materijala za %d$ !", mammount, mammount * 5);
SendClientMessage(playerid, COLOR_GREY, string);
SaveMatsSystem();
return 1;
    }
    return 1;
}


    Evo je komanda Pa pogledaj Kako sta treba Plizzzz
Obrisan korisnik Obrisan korisnik
pre 14 godina
Ovo je rekao LorgShigi da uradis
if(mammount <= 0) return 1;
Jovan_Blood
Enforcer
pre 14 godina
A izvini Gde to da stavim Kak da odradim Mos MI ti stavim Eno Tamo imas Komanda Plizzz BICu ti zahvalan 😄 Kaj molim te odradi mi to
Obrisan korisnik Obrisan korisnik
pre 14 godina
	 if(strcmp(cmd,"/buymats",true)==0) // By Ellis
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Morate se prvo prijaviti !");
            return 1;
        }
        if(PlayerInfo != 9)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Niste diler oruzija. ");
    return 1;
        }
        if(!PlayerToPoint(2.0, playerid, 2230.3579,-2286.2107,14.3751))
        {
            SendClientMessage(playerid, COLOR_GREY, "  Niste kod Banke Materijala !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /buymats ");
            return 1;
        }
        new mammount;
        mammount = strval(tmp);
if(mammount <= 0) return SendClientMessage(playerid, COLOR_GREY, " Suma nesme biti manja od 0 ! ");
        if(mammount > matssys)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Nemaju dovoljno materijala ! ");
            return 1;
        }
if(GetPlayerMoney(playerid) < mammount * 5 - 1)
{
    SendClientMessage(playerid, COLOR_GREY, "  Nemate dovoljno novca ! ");
    return 1;
}
matssys -= mammount;
PlayerInfo += mammount;
SafeGivePlayerMoney(playerid, - mammount * 5);
format(string, sizeof(string), "  Kupili ste %d materijala za %d$ !", mammount, mammount * 5);
SendClientMessage(playerid, COLOR_GREY, string);
SaveMatsSystem();
return 1;
    }
    return 1;
}

Evo dodao sam i ako ukuca ispod 0 ili 0 da vrati poruku: SendClientMessage(playerid, COLOR_GREY, " Suma nesme biti manja od 0 ! ");
Jovan_Blood
Enforcer
pre 14 godina
Hvala ti mnogooooo MOze LOCK

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava