[Pomoc/Pitanje]Level

Započeo Johnny, Mart 30, 2011, 21:40:59 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Johnny

Skripta koju koristim: GF Edit
Detaljan opis problema: Nemam problem , dao sam vam dole moj lvl sistem i zeleo bih da se ne kupuje  nego samo da predje i pise cestitamo :)
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
if (strcmp(cmd, "/buylevel", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (gPlayerLogged[playerid] != 0)
{
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
if(PlayerInfo[playerid][pLevel] >= 0)
{
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
new costlevel = nxtlevel*levelcost;//10k for testing purposes
new expamount = nxtlevel*levelexp;
new infostring[256];
if(GetPlayerMoney(playerid) < costlevel)
{
format(infostring, 256, "   Nažalost nemaÅ¡ dovoljno novca ($%d) !",costlevel);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}
else if (PlayerInfo[playerid][pExp] < expamount)
{
format(infostring, 256, "   TrebaÅ¡ %d Respekta , trenutno imaÅ¡ [%d] !",expamount,PlayerInfo[playerid][pExp]);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}
else
{
format(string, sizeof(string), "~g~LEVEL UP~n~~w~Bravo sada si level  %d", nxtlevel);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerPlayMusic(playerid);
GivePlayerMoney(playerid, (-costlevel));
PlayerInfo[playerid][pLevel]++;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
    PlayerInfo[playerid][pExp] -= expamount;
    new total = PlayerInfo[playerid][pExp];
    if(total > 0)
    {
        PlayerInfo[playerid][pExp] = total;
    }
    else
    {
        PlayerInfo[playerid][pExp] = 0;
    }
}
else
{
PlayerInfo[playerid][pExp] = 0;
}
PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
GameTextForPlayer(playerid, string, 5000, 1);
format(infostring, 256, "   Kupio si level %d za ($%d) Utipkaj /upgrade", nxtlevel, costlevel);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
format(infostring, 256, "   ImaÅ¡ %d neiskoriÅ¡tene Upgrade Points",PlayerInfo[playerid][gPupgrade]);
SendClientMessage(playerid, COLOR_GRAD2, infostring);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Nisi logiran !");
}
}
return 1;
}

Hoces da se ne placa?
Pa brisi ono costlevel

Johnny

Hocu da se ne placa i samo da izadje Cestitamo dobili ste lvl 2 samo tako nastavite! [ Automacki server prebacuje na lvl sledeci i nema upgrade]
i nema komande /buylevel
Poslednja Izmena: Mart 30, 2011, 21:52:53 POSLE PODNE od Johnny[E]

Probaj ovo,znaci nisam 43% siguran dal ce da radi :D u svakom slucaju reci ako bude radilo..
if (strcmp(cmd, "/buylevel", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (gPlayerLogged[playerid] != 0)
{
if(PlayerInfo[playerid][pLevel] >= 0)
{
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
new infostring[256];
format(string, sizeof(string), "~g~LEVEL UP~n~~w~Bravo sada si level  %d", nxtlevel);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerPlayMusic(playerid);
PlayerInfo[playerid][pLevel]++;
PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
GameTextForPlayer(playerid, string, 5000, 1);
format(infostring, 256, "   Kupio si level %d za ($%d) Utipkaj /upgrade", nxtlevel, costlevel);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
format(infostring, 256, "   ImaL'A; %d neiskoriL'A;tene Upgrade Points",PlayerInfo[playerid][gPupgrade]);
SendClientMessage(playerid, COLOR_GRAD2, infostring);
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Nisi logiran !");
}
}
return 1;
}

Poslednja Izmena: Mart 30, 2011, 21:55:26 POSLE PODNE od [BE] Monk

Johnny

Ovaj sistem sto si mi dao nema upgrade i kuplju levela [Sve je skoro isto]  ???

Citat: Johnny[E] poslato Mart 30, 2011, 21:58:46 POSLE PODNE
Ovaj sistem sto si mi dao nema upgrade i kuplju levela [Sve je skoro isto]  ???
omg pa jesi trazio da nema da se kupi,i ima upgrade ako malo bolje pogledas..

EDIT: Pa kako nece da bude isto kad je ovo tvoja komanda,samo sam izbrisao ono sto si rekao da ne zelis..
Poslednja Izmena: Mart 30, 2011, 22:05:34 POSLE PODNE od [BE] Monk