Szerző Téma: Nem saját név  (Megtekintve 895 alkalommal)

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Nem saját név
« Dátum: 2011. December 29. - 22:18:48 »
0 Show voters
Sziasztok,egyik haverom feljött a szerveremre,
és a textdrawok adatai (név,xp,játszott óra,szint) helyett,az én adataimat látta.
Nem tudjátok mitõl lehet?
Amik közre játszhatnak:
Timer:
[pawn]public Frissites()
{
    new playerid;
    //new nev[MAX_PLAYER_NAME];
GetPlayerName(playerid, nev, sizeof(nev));
new szint = JatekosInfo[playerid][szint];
new jatszottido = JatekosInfo[playerid][JatszottIdo];
new string2[128];
new string4[128];
format(string2, sizeof string2,\"~y~ Név: ~w~%s  ~y~Szint: ~w~%d ~y~Játszott Idõ:~w~ %d perc\", nev, szint, jatszottido);
TextDrawSetString(infovonal, string2);
new xp = JatekosInfo[playerid][XP];
new string3[128];
new bortonido = JatekosInfo[playerid][borton];
new kovszint = JatekosInfo[playerid][szint]+1;
new xpszukseges = kovszint*szintxp;
format(string3, sizeof string3,\"~y~%d/%d\", xp, xpszukseges);
TextDrawSetString(xpcsik, string3);
format(string4, sizeof string4,\"~y~Börtön: %d p\", bortonido);
TextDrawSetString(borton, string4);
}[/pawn]
Belépéskor textdrawok mutatása:
[pawn]                GetPlayerName(playerid, nev, sizeof(nev));
                new szint = JatekosInfo[playerid][szint];
            new string2[128];
            format(string2, sizeof string2,\"~y~ Név: ~w~%s  ~y~Szint: ~w~%d ~y~Játszott Idõ:~w~ %d perc\", nev, szint, jatszottido);
            TextDrawSetString(infovonal, string2);
            TextDrawShowForPlayer(playerid, infovonal);
            //
                new xp = JatekosInfo[playerid][XP];
                new bortonido = JatekosInfo[playerid][borton];
            new string3[128];
            new string4[128];
            new string5[128];
            new kovszint = JatekosInfo[playerid][szint]+1;
            new xpszukseges = kovszint*szintxp;
            format(string3, sizeof string3,\"~y~%d/%d\", xp, xpszukseges);
            TextDrawSetString(xpcsik, string3);
            format(string4, sizeof string4,\"~y~Börtön: %d p\", bortonido);
            TextDrawSetString(borton, string4);
            TextDrawShowForPlayer(playerid, xpcsik);
            new ev,honap,nap;
            getdate(ev,honap,nap);
            format(string5, sizeof string5,\"~y~%d.%d.%d.\", ev, honap, nap);
            TextDrawSetString(datum, string5);
            TextDrawShowForAll(datum);
            TextDrawTextSize(datum, 483.0, 49.0);[/pawn]

Nem saját név
« Válasz #1 Dátum: 2011. December 29. - 23:43:49 »
+1 Show voters
Ahjj,ezt mondtam az elôzõ topicodban...
Minden egges játèkosnak hozz lètre 1 textdrawot,ne csak egynek.

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Nem saját név
« Válasz #2 Dátum: 2011. December 30. - 09:19:48 »
0 Show voters
[pawn]
muszerfal = TextDrawCreate(0.0, 600.0, \"x\");
TextDrawUseBox(muszerfal, 1);
TextDrawColor(muszerfal,0x12900BBF);
TextDrawBoxColor(muszerfal, 0x12900BBF);
TextDrawSetOutline(muszerfal,1);
TextDrawBackgroundColor(muszerfal, 0x000000FF);
TextDrawFont(muszerfal, 2);
TextDrawAlignment(muszerfal, 2);
xpcsik = TextDrawCreate(555.500000000, 100.000000, \"x\");
TextDrawUseBox(xpcsik, 1);
TextDrawColor(xpcsik,0x12900BBF);
TextDrawBoxColor(xpcsik, 0x00000000);
TextDrawSetOutline(xpcsik,1);
TextDrawBackgroundColor(xpcsik, 0x00000000);
TextDrawFont(xpcsik, 2);
TextDrawAlignment(xpcsik, 2);
infovonal = TextDrawCreate(0.0, 0.0, \"x\");
TextDrawUseBox(infovonal, 1);
TextDrawColor(infovonal,0x12900BBF);
TextDrawBoxColor(infovonal, 0x12900BBF);
TextDrawSetOutline(infovonal,1);
TextDrawBackgroundColor(infovonal, 0x000000FF);
TextDrawFont(infovonal, 2);
borton = TextDrawCreate(560.500000000, 120.000000, \"x\");
TextDrawUseBox(borton, 1);
TextDrawColor(borton,0x12900BBF);
TextDrawBoxColor(borton, 0x00000000);
TextDrawSetOutline(borton,1);
TextDrawBackgroundColor(borton, 0x00000000);
TextDrawFont(borton, 2);
SetGameModeText(\"Blank Script\");
AddPlayerClass(101,722.3772,-1477.2856,5.4688,272.3814,0,0,0,0,0,0);
TextDrawAlignment(borton, 2);
datum = TextDrawCreate(560.0, 12.0, \"x\");
TextDrawUseBox(datum, 1);
TextDrawColor(datum,0x12900BBF);
TextDrawBoxColor(datum, 0x00000000);
TextDrawSetOutline(datum,1);
TextDrawBackgroundColor(datum, 0x000000FF);
TextDrawFont(datum, 2);
    TextDrawAlignment(datum, 2);
[/pawn]
ezt hogy érted? datum[playerid] vagy mire gondolsz? Bocsi,nem vettem észre akkor :S

Nem saját név
« Válasz #3 Dátum: 2011. December 30. - 09:45:31 »
+1 Show voters
Igen
new xpcsik[MAX_PLAYERS];
xpcsik[playerid]
Stb... :)

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Nem saját név
« Válasz #4 Dátum: 2011. December 30. - 09:57:37 »
0 Show voters
az összes textdraw nevét átírtam textdrawnév[MAX_PLAYERS]-re,de most ez az error van az összesnél:
 
error 032: array index out of bounds (variable \"borton\")

 
vagy az a baj,hogy: new Text:xpcsik[MAX_PLAYERS]; ?
« Utoljára szerkesztve: 2011. December 30. - 10:29:03 írta tudvari »

Nem elérhető Game94

  • 405
    • Profil megtekintése
Nem saját név
« Válasz #5 Dátum: 2011. December 30. - 10:40:03 »
+1 Show voters
Ha new xpcsik[MAX_PLAYERS]; van akkor mindenhova ahol eddig xpcsik -ot használtál, oda most xpcsik[playerid] kell. Pl:
[pawn]xpcsik[playerid] = TextDrawCreate(555.500000000, 100.000000, \"x\");
TextDrawUseBox(xpcsik[playerid], 1);
TextDrawColor(xpcsik[playerid],0x12900BBF);
TextDrawBoxColor(xpcsik[playerid], 0x00000000);
TextDrawSetOutline(xpcsik[playerid],1);
TextDrawBackgroundColor(xpcsik[playerid], 0x00000000);
TextDrawFont(xpcsik[playerid], 2);
TextDrawAlignment(xpcsik[playerid], 2);[/pawn]

Nem saját név
« Válasz #6 Dátum: 2011. December 30. - 10:40:51 »
0 Show voters
vagy az a baj,hogy: new Text:xpcsik[MAX_PLAYERS];[/quote]
uhh,bocsi igen kell a Text: is elé!

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Nem saját név
« Válasz #7 Dátum: 2011. December 30. - 10:55:05 »
0 Show voters
úgy volt elõbb is,azért kérdeztem,hogy hát ha törölni kell,mert te nem írtad :S lehetséges hogy az a baj,hogy az összes olyan dolgot ami pl.: a broton textdrawra vonatkozik,azt átírtam borton[MAX_PLAYERS] -re?

Nem elérhető Game94

  • 405
    • Profil megtekintése
Nem saját név
« Válasz #8 Dátum: 2011. December 30. - 10:57:41 »
+1 Show voters
Nem az a gond.
Az elõbb leírtam már, hogy miért írja ki a hibákat!

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Nem saját név
« Válasz #9 Dátum: 2011. December 30. - 10:59:15 »
0 Show voters
Köszi,bocsi,csak azt hittem hogy 1 ember írt,így egybõl a legaljára mentem :D

Nem elérhető Game94

  • 405
    • Profil megtekintése
Nem saját név
« Válasz #10 Dátum: 2011. December 30. - 11:01:52 »
+1 Show voters
Semmi gond, én is jártam már így :D
Egyébként ezt a hibát azért kapod, mert a változót létrehozod az összes játékosnak, de te úgy használod mintha csak egy sima változó lenne.

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Nem saját név
« Válasz #11 Dátum: 2011. December 30. - 11:09:54 »
0 Show voters
Köszi,nincs error,majd kipróbálom az egyik haverommal.Ment a +

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal