Peršokti į turinį
  • ŽAIDIMAI
  • , ŽAIDIMAI
  • ŽAIDIMAI

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 4974 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Recommended Posts

(redaguota)

Sveiki!

Neseniai pamoką (/premija) mums pateikė Arne_Tas.

Šios pamokos pradininkas yra:

Pradininkas:

Arne_Tas

aš tik šia sistema patobūlinau!

Taigi aš sugalvojau ją patobulinti (sudėjau į dialog'us) Pamoką kūriau aš.

Galimos premijos:

  • 250XP ir 500Lt
  • 500XP ir 1000Lt
  • 1000XP ir 2000Lt
  • 1500XP ir 3000Lt
  • 2000XP ir 3500Lt
  • 2500XP ir 5000Lt

Taigi pradėsime.

1. po callback'u

public OnPlayerCommandText(playerid, cmdtext[])

dedame šį kodą:

if(!strcmp(cmdtext, "/premija", true))
    {
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"PREMIJOS","250XP ir 500Lt\n500XP ir 1000LT\n1000XP ir 2000LT\n1500XP ir 3000LT\n2000XP ir 3500LT\n2500XP ir 5000LT","Gerai","Išeiti");
    return 1;
}

Pastaba: dialog ID prašome pasikeisti į laisvą.

2. po callback'u

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

dedame šį kodą:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!response) // jeigu paspaude iseiti
}
SendClientMessage(playerid,COLOR_RED,"Premijos neišdalintos.");
{
if(response) //jeigu paspaude gerai
}
if(listitem == 0)
{
new zin[128],vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);
format(zin,sizeof(zin),"{cc33ff}* Serverio savininkas %s visiems žaidėjams išdalino po {5FFB17}250 Xp {cc33ff}ir {5FFB17}500 Lt{cc33ff}.",vardas);
SendClientMessageToAll(COLOR_GREEN,zin);
for(new i=0;i<MAX_PLAYERS;i++)
GivePlayerMoneyA(i, 500);
for(new i=0;i<MAX_PLAYERS;i++)
SetPlayerScore(i,GetPlayerScore(i)+250);
return 1;
}

if(listitem == 1)
{
new zin[128],vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);
format(zin,sizeof(zin),"{cc33ff}* Serverio savininkas %s visiems žaidėjams išdalino po {5FFB17}500 Xp {cc33ff}ir {5FFB17}1000 Lt{cc33ff}.",vardas);
SendClientMessageToAll(COLOR_GREEN,zin);
for(new i=0;i<MAX_PLAYERS;i++)
GivePlayerMoneyA(i, 1000);
for(new i=0;i<MAX_PLAYERS;i++)
SetPlayerScore(i,GetPlayerScore(i)+500);
return 1;
}

if(listitem == 2);
{
new zin[128],vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);
format(zin,sizeof(zin),"{cc33ff}* Serverio savininkas %s visiems žaidėjams išdalino po {5FFB17}1000 Xp {cc33ff}ir {5FFB17}2000 Lt{cc33ff}.",vardas);
SendClientMessageToAll(COLOR_GREEN,zin);
for(new i=0;i<MAX_PLAYERS;i++)
GivePlayerMoneyA(i, 2000);
for(new i=0;i<MAX_PLAYERS;i++)
SetPlayerScore(i,GetPlayerScore(i)+1000);
return 1;
}

if(listitem == 3);
{
new zin[128],vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);
format(zin,sizeof(zin),"{cc33ff}* Serverio savininkas %s visiems žaidėjams išdalino po {5FFB17}1500 Xp {cc33ff}ir {5FFB17}3000 Lt{cc33ff}.",vardas);
SendClientMessageToAll(COLOR_GREEN,zin);
for(new i=0;i<MAX_PLAYERS;i++)
GivePlayerMoneyA(i, 3000);
for(new i=0;i<MAX_PLAYERS;i++)
SetPlayerScore(i,GetPlayerScore(i)+1500);
return 1;
}

if(listitem == 4);
{
new zin[128],vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);
format(zin,sizeof(zin),"{cc33ff}* Serverio savininkas %s visiems žaidėjams išdalino po {5FFB17}2000 Xp {cc33ff}ir {5FFB17}3500 Lt{cc33ff}.",vardas);
SendClientMessageToAll(COLOR_GREEN,zin);
for(new i=0;i<MAX_PLAYERS;i++)
GivePlayerMoneyA(i, 3500);
for(new i=0;i<MAX_PLAYERS;i++)
SetPlayerScore(i,GetPlayerScore(i)+2000);
return 1;
}

if(listitem == 5);
{
new zin[128],vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);
format(zin,sizeof(zin),"{cc33ff}* Serverio savininkas %s visiems žaidėjams išdalino po {5FFB17}2500 Xp {cc33ff}ir {5FFB17}5000 Lt{cc33ff}.",vardas);
SendClientMessageToAll(COLOR_GREEN,zin);
for(new i=0;i<MAX_PLAYERS;i++)
GivePlayerMoneyA(i, 5000);
for(new i=0;i<MAX_PLAYERS;i++)
SetPlayerScore(i,GetPlayerScore(i)+2500);
return 1;
}
return 1;
}

(Viskas atrodo taip.)

Taigi spaudžiame compile.

Įspėjimas: aš šitos sistemos(su dialog'ais) nebandžiau, tad prašome rašyti kas negerai.

PAMOKA KŪRIAU AŠ!

PATIKO? +REP

Redaguota , nario rokasma
  • Teigiamai 3

  • "Some people want it to happen, some wish it would happen, others make it happen" - Michael Jordan
  • "If someone hates you for no reason, give that motherfucker a reason."

data/init.txt(253) : error 017: undefined symbol "SukuriameVerslus"

data/init.txt(308) : error 017: undefined symbol "AntiDeAMX"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(584) : error 017: undefined symbol "KickPlayerFromRace"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(682) : error 017: undefined symbol "KickPlayerFromRace"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1474) : error 017: undefined symbol "ErrorMsg"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1482) : error 017: undefined symbol "ErrorMsg"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1484) : error 017: undefined symbol "zVardas"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1508) : error 017: undefined symbol "zVardas"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1513) : error 017: undefined symbol "ErrorMsg"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1807) : error 004: function "VaildFishPlace" is not implemented

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(7182) : error 017: undefined symbol "NullRaceVariables"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9219) : error 004: function "SavePelnai" is not implemented

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9942) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9942) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9947) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9951) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9951 -- 9952) : warning 215: expression has no effect

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9952) : error 001: expected token: ";", but found "if"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9962) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9975) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9978) : error 036: empty statement

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9988) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9991) : warning 225: unreachable code

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9991) : error 036: empty statement

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10001) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10004) : warning 225: unreachable code

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10004) : error 036: empty statement

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10014) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10017) : warning 225: unreachable code

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10017) : error 036: empty statement

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

26 Errors.

  • Teigiamai 1

data/init.txt(253) : error 017: undefined symbol "SukuriameVerslus"

data/init.txt(308) : error 017: undefined symbol "AntiDeAMX"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(584) : error 017: undefined symbol "KickPlayerFromRace"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(682) : error 017: undefined symbol "KickPlayerFromRace"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1474) : error 017: undefined symbol "ErrorMsg"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1482) : error 017: undefined symbol "ErrorMsg"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1484) : error 017: undefined symbol "zVardas"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1508) : error 017: undefined symbol "zVardas"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1513) : error 017: undefined symbol "ErrorMsg"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1807) : error 004: function "VaildFishPlace" is not implemented

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(7182) : error 017: undefined symbol "NullRaceVariables"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9219) : error 004: function "SavePelnai" is not implemented

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9942) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9942) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9947) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9951) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9951 -- 9952) : warning 215: expression has no effect

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9952) : error 001: expected token: ";", but found "if"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9962) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9975) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9978) : error 036: empty statement

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9988) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9991) : warning 225: unreachable code

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9991) : error 036: empty statement

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10001) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10004) : warning 225: unreachable code

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10004) : error 036: empty statement

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10014) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10017) : warning 225: unreachable code

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10017) : error 036: empty statement

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

26 Errors.

Nepadėjai kur nors { arba }

  • Parašė po 3 savaičių...

data/init.txt(253) : error 017: undefined symbol "SukuriameVerslus"

data/init.txt(308) : error 017: undefined symbol "AntiDeAMX"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(584) : error 017: undefined symbol "KickPlayerFromRace"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(682) : error 017: undefined symbol "KickPlayerFromRace"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1474) : error 017: undefined symbol "ErrorMsg"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1482) : error 017: undefined symbol "ErrorMsg"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1484) : error 017: undefined symbol "zVardas"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1508) : error 017: undefined symbol "zVardas"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1513) : error 017: undefined symbol "ErrorMsg"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(1807) : error 004: function "VaildFishPlace" is not implemented

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(7182) : error 017: undefined symbol "NullRaceVariables"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9219) : error 004: function "SavePelnai" is not implemented

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9942) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9942) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9947) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9951) : error 029: invalid expression, assumed zero

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9951 -- 9952) : warning 215: expression has no effect

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9952) : error 001: expected token: ";", but found "if"

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9962) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9975) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9978) : error 036: empty statement

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9988) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9991) : warning 225: unreachable code

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(9991) : error 036: empty statement

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10001) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10004) : warning 225: unreachable code

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10004) : error 036: empty statement

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10014) : error 079: inconsistent return types (array & non-array)

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10017) : warning 225: unreachable code

D:\Mano Dokumentai\Domo dokumentai\LSG 1.5.0\gamemodes\LSG.pwn(10017) : error 036: empty statement

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

26 Errors.

"If you even dream of beating me you'd better wake up and apologize" - Muhammad Ali

Vaikai, jūs atsigaukit, jūs galvojat kad GRP yra tik samp'ui žaist, Jūs pradėkit kurti savo GM, o ne modifikuokit, jūs patys žinote kad kai sukursite maximum žmonių bus 5, o ir tinklapį turėsit kažkokį subdomeną, tai iškart atbaido bent jau mane, kurkit savo GM nesvarbu ar jis RP ar kitoks, tik svarbu kad ne GRP kodas. :)

468x60.png

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 4974 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Svečias
Ši tema yra užrakinta.
  • Šiame puslapyje naršo:   0 nariai

    • Nėra registruotų narių peržiūrinčių šį forumą.

Skelbimai


×
×
  • Sukurti naują...