Hallo Breadfish,
Ich habe ein Problem mit meine Stats box undzwa ich sehe Stats aber nicht meine sondern von den Player mit der kleinsten Id
Code:
Oben im Script:
forward UpdateTimer(playerid, targetid);
//==== Stats Box==//new Text:Textdraw0;new Text:Textdraw1;new Text:Textdraw2;new Text:Textdraw3;new Text:Textdraw4;new Text:Textdraw5;new Text:Textdraw6;new Text:Textdraw7;//=== stats Box===//
OnPlayerConnect:
TextDrawShowForPlayer(playerid, Textdraw0); TextDrawShowForPlayer(playerid, Textdraw1); TextDrawShowForPlayer(playerid, Textdraw2); TextDrawShowForPlayer(playerid, Textdraw3); TextDrawShowForPlayer(playerid, Textdraw4); TextDrawShowForPlayer(playerid, Textdraw5); TextDrawShowForPlayer(playerid, Textdraw6); TextDrawShowForPlayer(playerid, Textdraw7);
OnGamemodeInit:
SetTimer("UpdateTimer", 1000, 1);
Textdraw0 = TextDrawCreate(500.000000, 101.000000, "~n~~n~~n~~n~~n~~n~~n~~n~~n~");TextDrawBackgroundColor(Textdraw0, 255);TextDrawFont(Textdraw0, 1);TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);TextDrawColor(Textdraw0, -1);TextDrawSetOutline(Textdraw0, 1);TextDrawSetProportional(Textdraw0, 1);TextDrawUseBox(Textdraw0, 1);TextDrawBoxColor(Textdraw0, 255);TextDrawTextSize(Textdraw0, 607.000000, 19.000000);
Textdraw1 = TextDrawCreate(531.000000, 100.000000, "Stats");TextDrawBackgroundColor(Textdraw1, 255);TextDrawFont(Textdraw1, 1);TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);TextDrawColor(Textdraw1, 16777215);TextDrawSetOutline(Textdraw1, 0);TextDrawSetProportional(Textdraw1, 1);TextDrawSetShadow(Textdraw1, 1);
Textdraw2 = TextDrawCreate(498.000000, 114.000000, "Payday:");TextDrawBackgroundColor(Textdraw2, 255);TextDrawFont(Textdraw2, 1);TextDrawLetterSize(Textdraw2, 0.310000, 1.300000);TextDrawColor(Textdraw2, 16711935);TextDrawSetOutline(Textdraw2, 0);TextDrawSetProportional(Textdraw2, 1);TextDrawSetShadow(Textdraw2, 1);
Textdraw3 = TextDrawCreate(498.000000, 126.000000, "Bank:");TextDrawBackgroundColor(Textdraw3, 255);TextDrawFont(Textdraw3, 1);TextDrawLetterSize(Textdraw3, 0.460000, 1.000000);TextDrawColor(Textdraw3, 16711935);TextDrawSetOutline(Textdraw3, 0);TextDrawSetProportional(Textdraw3, 1);TextDrawSetShadow(Textdraw3, 1);
Textdraw4 = TextDrawCreate(498.000000, 135.000000, "Respekt:");TextDrawBackgroundColor(Textdraw4, 255);TextDrawFont(Textdraw4, 1);TextDrawLetterSize(Textdraw4, 0.350000, 1.400000);TextDrawColor(Textdraw4, 16711935);TextDrawSetOutline(Textdraw4, 0);TextDrawSetProportional(Textdraw4, 1);TextDrawSetShadow(Textdraw4, 1);
Textdraw5 = TextDrawCreate(499.000000, 147.000000, "Premium Punkte:");TextDrawBackgroundColor(Textdraw5, 255);TextDrawFont(Textdraw5, 1);TextDrawLetterSize(Textdraw5, 0.250000, 1.700000);TextDrawColor(Textdraw5, 16711935);TextDrawSetOutline(Textdraw5, 0);TextDrawSetProportional(Textdraw5, 1);TextDrawSetShadow(Textdraw5, 1);
Textdraw6 = TextDrawCreate(498.000000, 163.000000, "Handy nr:");TextDrawBackgroundColor(Textdraw6, 255);TextDrawFont(Textdraw6, 1);TextDrawLetterSize(Textdraw6, 0.450000, 1.200000);TextDrawColor(Textdraw6, 16711935);TextDrawSetOutline(Textdraw6, 0);TextDrawSetProportional(Textdraw6, 1);TextDrawSetShadow(Textdraw6, 1);
Textdraw7 = TextDrawCreate(497.000000, 176.000000, "//");TextDrawBackgroundColor(Textdraw7, 255);TextDrawFont(Textdraw7, 1);TextDrawLetterSize(Textdraw7, 0.500000, 1.000000);TextDrawColor(Textdraw7, 0x00FFFFFF);TextDrawSetOutline(Textdraw7, 0);TextDrawSetProportional(Textdraw7, 1);TextDrawSetShadow(Textdraw7, 1);
UpdateTimer:
public UpdateTimer(playerid,targetid){ new PayDay[255]; format(PayDay, sizeof(PayDay), "PayDay: %d/60", PlayerInfo[targetid][pPlayMinutes]); TextDrawSetString(Textdraw2, PayDay);
new Bank[255]; format(Bank, sizeof(Bank), "Bank: %d", PlayerInfo[targetid][pAccount]); TextDrawSetString(Textdraw3, Bank);
new Respekt[255]; format(Respekt, sizeof(Respekt), "Respekt: %d", PlayerInfo[targetid][pExp]); TextDrawSetString(Textdraw4, Respekt);
new Premium[255]; format(Premium, sizeof(Premium), "Premium Punkte: %d", PlayerInfo[targetid][pPremiumPunkte]); TextDrawSetString(Textdraw5, Premium);
new Handy[255]; format(Handy, sizeof(Handy), "Handy Nr: %d", PlayerInfo[targetid][pPnumber]); TextDrawSetString(Textdraw6, Handy);}