Guten Tag Community.
Ich bin ja noch sehr sehr neu im Scripting Bereich und stelle deshalb viele Fragen.
Natürlich hoffe ich, dass es noch Leute gibt die mir da helfen können.
Heute habe ich eine Frage zum Thema /stats in einen Dialog umschreiben, weil das jetzige per SendClientMessage angezeigt wird.
Kann mir jemand dabei helfen es umzuschreiben?
Es ist besser wenn mir hier jemand hilft.
Denn wenn ich Tutorials anschaue usw, mache ich manchmal trotzdem noch Fehler.
new whostats[48];
if (targetid == playerid) whostats = "Your";
else if(targetid != playerid) format(whostats, sizeof(whostats), "%s's", PlayerName(targetid));
format(string, sizeof(string), "%s Statistics", whostats);
SendClientMessage(playerid, LIGHTORANGE, string);
format(string, sizeof(string), "Level: %d ~ Gender: %s ~ Age: %d ~ Wallet: $%d ~ Bank Account: $%d ~ Bank PIN: %d ~ Phone Number: %d ~ Job: %s (%d)", plevel, gender, age, wallet, bank, bankpin, number, job, joblevel);
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "Total Hours Online: %d ~ Warnings: %d ~ Upgrade Points: %d ~ Spawn Armor: %d ~ Experience: %d/%d ~ Crimes Committed: %d ~ Times Arrested: %d", hours, warns, upgradepoints, spawnhealth, exp, expamount, crimes, arrests);
SendClientMessage(playerid, WHITE, string);
new smallstr[64];
format(string, sizeof(string), "Organization: %s ~ Rank: %s (%d) ~ Products: %d ~ Wanted Level: %d ~ ", GetPlayerFactionName(targetid), GetPlayerRank(targetid), rank, prods, wantedlevel);
#if defined COOKIE_SYSTEM
format(smallstr, sizeof(smallstr), "Cookies: %d ~ ", cookies);
strcat(string, smallstr);
#endif
#if defined GIFT_SYSTEM
format(smallstr, sizeof(smallstr), "Gifts: %d ~ ", gifts);
strcat(string, smallstr);
#endif
#if defined REWARD_SYSTEM
format(smallstr, sizeof(smallstr), "Reward Tokens: %d ~ ", PlayerInfo[targetid][pRewardTokens]);
strcat(string, smallstr);
#endif
format(smallstr, sizeof(smallstr), "Channel: %d khz", wtc);
strcat(string, smallstr);
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "Health: %.0f ~ Armor: %.0f ~ %s: %s ~ Cocaine: %dg ~ Weed: %dg ~ Material Packages: %d ~ Drug Packages: %d ~ Materials: %d", health, armor, marriage, PlayerInfo[targetid][pMarriedTo], cocaine, weed, packages, drugpackages, materials);
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "VIP Rank: %s (%d) ~ Bills: $%d ~ Ropes: %d ~ Cigars: %d ~ Cans of Sprunk: %d ~ Spraycans: %d ~ Heroin: %dg ~ Meth: %dg", viprank, PlayerInfo[targetid][pDonateRank], bills, ropes, cigars, sprunk, spraycans, heroin, meth);
SendClientMessage(playerid, WHITE, string);
new divisiontext[32], divisiontag[12];
if (PlayerInfo[targetid][pDivision] == 0) divisiontext = "None", divisiontag = "N/A";
if (PlayerInfo[targetid][pDivision] >= 1) format(divisiontext, 32, DivisionInfo[PlayerInfo[targetid][pMember]][PlayerInfo[targetid][pDivision]][divisionName]), format(divisiontag, 12, DivisionInfo[PlayerInfo[targetid][pMember]][PlayerInfo[targetid][pDivision]][divisionTag]);
new vehicles;
for (new i = 1; i <= MAX_OWNED_CARS; i++)
{
if (VehicleKeys[targetid] != 0) vehicles++;
}
new yesno[10];
if (iPod[targetid] == 0) yesno = "No";
if (iPod[targetid] == 1) yesno = "Yes";
format(string, sizeof(string), "Division: %s (%s) ~ Vehicles: %d/%d ~ iPod: %s ~ Total Wealth: $%d ~ Date Registered: %s %d, %d @ %02d:%02d:%02d", divisiontext, divisiontag, vehicles, MAX_OWNED_CARS, yesno, wallet + bank, GetMonth(PlayerInfo[targetid][pRegisterDate][2]), PlayerInfo[targetid][pRegisterDate][1], PlayerInfo[targetid][pRegisterDate][3], PlayerInfo[targetid][pRegisterDate][4], PlayerInfo[targetid][pRegisterDate][5], PlayerInfo[targetid][pRegisterDate][6]);
SendClientMessage(playerid, WHITE, string);
if (PlayerInfo[playerid][pAdmin] > 0) // How come this wasn't added?
{
format(string, sizeof(string), "Admin Level: %d ~ House Keys: %d/%d ~ Garage Keys: %d/%d ~ Business Keys: %d/%d ~ Interior: %d ~ World: %d ~ Jail: %s (%d sec)", admin, housekey, HouseKey2[targetid], garagekey, GarageKey2[targetid], bizkey, BizKey2[targetid], interior, virtualworld, jailtype, jailtime);
SendClientMessage(playerid, LIGHTRED, string);
}
}
return 1;
}
Ich bedanke mich schon mal im Voraus.
MfG - Tobi_Wayne