[pomoc]Da se Leveli ne prebacivaju preko komande

12. Apr. 2013. Zaključano
719
pregleda
16
postova
mistic144
4
Enforcer
12. Apr. 2013.
Skripta koju koristim: CLRP edit
Detaljan opis problema: Kako da napravim da u pay day broji respekte umjesto komande da se sami broje i da se sami lvli prebacuju
Dio skripte:
public PayDay()
{
new string;
new coordstring;
new coordstring1;
new coordstring2;
new coordstring3;
new coordstring4;
new coordstring5;
new coordstring6;
new coordstring7;
new coordstring8;
new payday;
new account,interest;
new rent = 0;
foreach (Player, i)
{
    if(PlayerInfo > 0)
    {
    if(MoneyMessage==1)
{
    SendClientMessage(i, COLOR_LIGHTRED, "Niste uspjeli da vratite dug, idete u zatvor.");
    GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
    new rand = random(sizeof(gRandomJailSpawns));
SetPlayerPos(i, gRandomJailSpawns, gRandomJailSpawns, gRandomJailSpawns);
            PlayerInfo = 1;
            SafeResetPlayerWeapons(i);
            SafeResetPlayerMoney(i);
WantedPoints = 0;
PlayerInfo = 240;
format(string, sizeof(string), "Uhapseni ste na %d sekundi.  Kaucija: Nedostupna", PlayerInfo);
SendClientMessage(i, COLOR_WHITE, string);
}
new playername2;
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo;
new tmpintrate;
if (PlayerInfo != 255 && strcmp(playername2, Houses[PlayerInfo], true) == 0)
{
    if(GetPVarInt(i, "DonatorRank")  > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//Houses
}
else
{
    if(GetPVarInt(i, "DonatorRank")  > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo >= 5)
{
    Tax += TaxValue;//Should work for every player online
    PlayerInfo -= TaxValue;
new checks = PlayerInfo / 50;
if(PlayerInfo > 0)
{
    new bonus = PlayerInfo / 100;
    checks += bonus;
}
    new ebill = (PlayerInfo/10000)*(PlayerInfo);
    account += checks;
    if(PlayerInfo > 0)
    {
    PlayerInfo -= ebill;
    SBizzInfo += ebill;
}
else
{
    ebill = 0;
}
interest = (PlayerInfo/1000)*(tmpintrate);
if(respekti == 0) // Ako su iskljuceni
{
    PlayerInfo ++; //++ Znaci da dodaje igracima 1
}
else // U suprotnom
{
    PlayerInfo += 2; //+= 2 Znaci dodaje igracima 2
}
PlayerInfo = account+interest;
format(coordstring, sizeof(coordstring),  " {157DEC}Plata: {FFFFFF}$%d\n {157DEC}Takse: {FFFFFF}-$%d\n", checks, TaxValue);
if(PlayerInfo != 255 || PlayerInfo != 255)
{
    format(coordstring1, sizeof(coordstring1), " {157DEC}Racun za struju: {FFFFFF}-$%d\n", ebill);
}
format(coordstring2, sizeof(coordstring2), " {157DEC}Staro Stanje: {FFFFFF}$%d\n", account - checks);
format(coordstring3, sizeof(coordstring3), " {157DEC}Kamata: {FFFFFF}0.%d posto\n",tmpintrate);
format(coordstring4, sizeof(coordstring4), " {157DEC}Kamatni Interes: {FFFFFF}$%d\n", interest);
format(coordstring5, sizeof(coordstring5), " {157DEC}Novo stanje: {FFFFFF}$%d\n", PlayerInfo);
format(coordstring6, sizeof(coordstring6), " {157DEC}Renta: {FFFFFF}-$%d\n", rent);
format(coordstring7, sizeof(coordstring7), " {157DEC}Ukupan Kredit: {FFFFFF}$%d\n", PlayerInfo);
if(PlayerInfo != 0)
{
format(coordstring8, sizeof(coordstring8), " {157DEC}Rata: {FFFFFF}%d\n", PlayerInfo);
PlayerInfo -= 500;
PlayerInfo -= 500;
}
format(payday, 512,"%s%s%s%s%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,coordstring8);
    ShowPlayerDialog(i, 667, DIALOG_STYLE_MSGBOX, "{157DEC}Payday | Placa", payday , "Uredu", "Uredu");
format(string, sizeof(string), "~y~Plata~n~~w~Plata je stigla na vas racun");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo += 1;
if(FarmerVar == 0)
{
FarmerPickup = 0;
}
if(DrugFarmerVar == 0)
{
DrugFarmerPickup = 0;
}
if(SmugglerWork == 0)
{
PayDaySecure = 0;
}
if(PlayerInfo > 0)
{
    PlayerInfo += 1;
    if(PlayerInfo >= 5)
    {
        PlayerInfo++;
        PlayerInfo = 0;
    }
}
}
else
{
    SendClientMessage(i, COLOR_WHITE, "* Niste igrali dovoljno dugo da biste dobili platu.");
}
}
}
SaveAccounts();
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Blaeks_Biofor
5
Forum Don
12. Apr. 2013.
if (PlayerInfo >= expamount)
    {

PlayerInfo++;

SetPlayerScore(i, PlayerInfo);
    }
mistic144
4
Enforcer
12. Apr. 2013.
Blaeks wrote on April 12, 2013, 6:27 pm:
if (PlayerInfo >= expamount)
    {

PlayerInfo++;

SetPlayerScore(i, PlayerInfo);
    }


Pozabio sam oko payDay kamo ide
Blaeks_Biofor
5
Forum Don
12. Apr. 2013.
stavis ga negde pred kraj paydaya
mistic144
4
Enforcer
13. Apr. 2013.
ovo mi sada baca
C:\Documents and Settings\User\Desktop\Balkan Life\Balkan Life\gamemodes\BLRP.pwn(31943) : error 017: undefined symbol "targetid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

1 Error.


a ovo sam dodao jer je i za to bacalo erore
	new nxtlevel = PlayerInfo+1;
new expamount = nxtlevel*levelexp;
Blaeks_Biofor
5
Forum Don
13. Apr. 2013.
stavi ovako
public PayDay()
{
new string;
new coordstring;
new coordstring1;
new coordstring2;
new coordstring3;
new coordstring4;
new coordstring5;
new coordstring6;
new coordstring7;
new coordstring8;
new payday;
new account,interest;
new rent = 0;
foreach (Player, i)
{
    if(PlayerInfo > 0)
    {
    if(MoneyMessage==1)
{
    SendClientMessage(i, COLOR_LIGHTRED, "Niste uspjeli da vratite dug, idete u zatvor.");
    GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
    new rand = random(sizeof(gRandomJailSpawns));
SetPlayerPos(i, gRandomJailSpawns, gRandomJailSpawns, gRandomJailSpawns);
            PlayerInfo = 1;
            SafeResetPlayerWeapons(i);
            SafeResetPlayerMoney(i);
WantedPoints = 0;
PlayerInfo = 240;
format(string, sizeof(string), "Uhapseni ste na %d sekundi.  Kaucija: Nedostupna", PlayerInfo);
SendClientMessage(i, COLOR_WHITE, string);
}
new playername2;
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo;
new tmpintrate;
if (PlayerInfo != 255 && strcmp(playername2, Houses[PlayerInfo], true) == 0)
{
    if(GetPVarInt(i, "DonatorRank")  > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//Houses
}
else
{
    if(GetPVarInt(i, "DonatorRank")  > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo >= 5)
{
    Tax += TaxValue;//Should work for every player online
    PlayerInfo -= TaxValue;
new checks = PlayerInfo / 50;
if(PlayerInfo > 0)
{
    new bonus = PlayerInfo / 100;
    checks += bonus;
}
    new ebill = (PlayerInfo/10000)*(PlayerInfo);
    account += checks;
    if(PlayerInfo > 0)
    {
    PlayerInfo -= ebill;
    SBizzInfo += ebill;
}
else
{
    ebill = 0;
}
interest = (PlayerInfo/1000)*(tmpintrate);
if(respekti == 0) // Ako su iskljuceni
{
    PlayerInfo ++; //++ Znaci da dodaje igracima 1
}
else // U suprotnom
{
    PlayerInfo += 2; //+= 2 Znaci dodaje igracima 2
}
PlayerInfo = account+interest;
format(coordstring, sizeof(coordstring),  " {157DEC}Plata: {FFFFFF}$%d\n {157DEC}Takse: {FFFFFF}-$%d\n", checks, TaxValue);
if(PlayerInfo != 255 || PlayerInfo != 255)
{
    format(coordstring1, sizeof(coordstring1), " {157DEC}Racun za struju: {FFFFFF}-$%d\n", ebill);
}
format(coordstring2, sizeof(coordstring2), " {157DEC}Staro Stanje: {FFFFFF}$%d\n", account - checks);
format(coordstring3, sizeof(coordstring3), " {157DEC}Kamata: {FFFFFF}0.%d posto\n",tmpintrate);
format(coordstring4, sizeof(coordstring4), " {157DEC}Kamatni Interes: {FFFFFF}$%d\n", interest);
format(coordstring5, sizeof(coordstring5), " {157DEC}Novo stanje: {FFFFFF}$%d\n", PlayerInfo);
format(coordstring6, sizeof(coordstring6), " {157DEC}Renta: {FFFFFF}-$%d\n", rent);
format(coordstring7, sizeof(coordstring7), " {157DEC}Ukupan Kredit: {FFFFFF}$%d\n", PlayerInfo);
if(PlayerInfo != 0)
{
format(coordstring8, sizeof(coordstring8), " {157DEC}Rata: {FFFFFF}%d\n", PlayerInfo);
PlayerInfo -= 500;
PlayerInfo -= 500;
}
format(payday, 512,"%s%s%s%s%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,coordstring8);
    ShowPlayerDialog(i, 667, DIALOG_STYLE_MSGBOX, "{157DEC}Payday | Placa", payday , "Uredu", "Uredu");
format(string, sizeof(string), "~y~Plata~n~~w~Plata je stigla na vas racun");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo += 1;
if(FarmerVar == 0)
{
FarmerPickup = 0;
}
                                        if (PlayerInfo >= expamount)
        {
PlayerInfo++;
SetPlayerScore(i, PlayerInfo);
        }
if(DrugFarmerVar == 0)
{
DrugFarmerPickup = 0;
}
if(SmugglerWork == 0)
{
PayDaySecure = 0;
}
if(PlayerInfo > 0)
{
    PlayerInfo += 1;
    if(PlayerInfo >= 5)
    {
        PlayerInfo++;
        PlayerInfo = 0;
    }
}
}
else
{
    SendClientMessage(i, COLOR_WHITE, "* Niste igrali dovoljno dugo da biste dobili platu.");
}
}
}
SaveAccounts();
return 1;
}
mistic144
4
Enforcer
13. Apr. 2013.
sad opet ovo baca
C:\Documents and Settings\User\Desktop\Balkan Life\Balkan Life\gamemodes\BLRP.pwn(32037) : error 017: undefined symbol "expamount"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

1 Error.
Blaeks_Biofor
5
Forum Don
13. Apr. 2013.
pa pazi, ja ne znam kako je tebi definisana granica levela, mislim  broj popunjenih respekta, to izmeni kako je tebi
mistic144
4
Enforcer
14. Apr. 2013.
Blaeks wrote on April 13, 2013, 11:54 am:
pa pazi, ja ne znam kako je tebi definisana granica levela, mislim  broj popunjenih respekta, to izmeni kako je tebi


Di mogu to vidit ?
eXtreme
2
Wheel Man
14. Apr. 2013.
Komanda /levelup
mistic144
4
Enforcer
14. Apr. 2013.
	if (strcmp(cmd, "/levelup", true) == 0 || strcmp(cmd, "/kupilevel", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (gPlayerLogged != 0)
{
/*PlayerInfo = GetPlayerMoney(playerid);*/
if(PlayerInfo >= 0)
{
new nxtlevel = PlayerInfo+1;
/*new costlevel = nxtlevel*levelcost;//10k for testing purposes*/
new expamount = nxtlevel*levelexp;
new infostring;
/*if(GetPlayerMoney(playerid) < costlevel)
{
format(infostring, 256, "  You do not have enough Cash ($%d)!",costlevel);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}*/
if (PlayerInfo < expamount)
{
format(infostring, 256, "Treba vam %d Respekt Poena,trenutno imate [%d]!",expamount,PlayerInfo);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}
else
{
format(string, sizeof(string), "~g~VECI NIVO~n~~w~Sada ste level %d", nxtlevel);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
/*GivePlayerCash(playerid, (-costlevel));*/
PlayerInfo++;
if(PlayerInfo > 0)
{
    PlayerInfo -= expamount;
    new total = PlayerInfo;
    if(total > 0)
    {
        PlayerInfo = total;
    }
    else
    {
        PlayerInfo = 0;
    }
}
else
{
PlayerInfo = 0;
}
PlayerInfo = PlayerInfo+2;
GameTextForPlayer(playerid, string, 5000, 1);
format(infostring, 256, "Kupili ste level %d Kucajte /nadogradnjda", nxtlevel);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
format(infostring, 256, "Imate %d nepotrosenih Upgrade Poena",PlayerInfo);
SendClientMessage(playerid, COLOR_GRAD2, infostring);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Niste prijavljeni!");
}
}
return 1;
}


st mi od tud treba ?
Blaeks_Biofor
5
Forum Don
14. Apr. 2013.
pa eto lepo sam ti postavio proveru onda..
mistic144
4
Enforcer
14. Apr. 2013.
ali zas ovo ond baca
C:\Documents and Settings\User\Desktop\Balkan Life\Balkan Life\gamemodes\BLRP.pwn(31468) : error 017: undefined symbol "expamount"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

1 Error.
Blaeks_Biofor
5
Forum Don
14. Apr. 2013.
stavi ovako iznad toga
new nxtlevel = PlayerInfo+1;
                new expamount = nxtlevel*levelexp;
mistic144
4
Enforcer
14. Apr. 2013.
Moze lock ok je sad radi

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha