Hallo ich habe folgendes Problem,
Ich möchte mit /Clantag <Team1> <Team2> die Tags im Textdraw ändern doch dann ändert sich der Text in folgendes von
zu
CODE:
Textdraw2 = TextDrawCreate(7.000000, 433.000000, "Match: ~b~DoD ~w~vs. ~g~Away ~w~Score: ~b~0~w~:~g~0 ~w~Total: ~b~0~w~:~g~0 ~w~Round: ~y~0~w~:~y~0 ~w~Kills: ~y~00");
Textdraw4 = TextDrawCreate(322.000000, 433.000000, "Deaths: ~y~00 ~w~TeamKills: ~y~00 ~w~Ratio: 0.00 Forum: ~p~www.DoDlerz-Clan.com");
dcmd_clantag(playerid, params[])
{
#pragma unused params
new cstr[10], cstr2[10];
if(!IsPlayerClanwarAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "(Warning) You are not authorized to use this command");
if(sscanf(params, "ss", cstr, cstr2)) return SendClientMessage(playerid, COLOR_RED, "(Warning) Syntax: /Clantag <Team1> <Team2>");
format(Clanwar[clantag_1], sizeof Clanwar[clantag_1], "%s", cstr);
format(Clanwar[clantag_2], sizeof Clanwar[clantag_2], "%s", cstr2);
UpdateTextdraws(playerid);
SendFormattedMessageToAll(COLOR_LIME, ""#DIALOG_LIME"(Server) Admin %s(%d) has changed the clantags. "#DIALOG_LIME"Team1: "#DIALOG_WHITE"%s "#DIALOG_LIME"Team2: "#DIALOG_WHITE"%s", PlayerName[playerid], playerid, cstr, cstr2);
return 1;
}
forward UpdateTextdraws(playerid);
public UpdateTextdraws(playerid)
{
format(str, sizeof str, "Match: ~b~%s ~w~vs. ~g~%s ~w~Score: ~b~%d~w~:~g~%d ~w~Total: ~b~%d~w~:~g~%d ~w~Round: ~y~%d~w~:~y~%d ~w~Kills: ~y~%d",Clanwar[clantag_1] ,Clanwar[clantag_2], Clanwar[team1_pound], Clanwar[team2_pound], Clanwar[team1_round], Clanwar[team2_round], PlayerKills[playerid]);
TextDrawSetString(Textdraw2, str);
format(str2, sizeof str2, "Deaths: ~y~%d ~w~TeamKills: ~y~%d ~w~Ratio: 0.00 Forum: ~p~www.DoDlerz-Clan.com", PlayerDeaths[playerid], PlayerKills[playerid], TeamKills[playerid], PlayerRatio[playerid]);
TextDrawSetString(Textdraw4, str2);
return 1;
}
#Edit: Code Übersicht verbessert