Das ist ne ziemlich verzwickte Sache...
Also, ich hab es jetzt einmal weitgehendst versucht umzusetzen.
public OnGameModeInit()
{
//Updating Dialogs
AddItemToDialog(U_DIALOG_DM_DE, "[0] DM1 [Sniper, Desert Eagle, Shotgun]");
AddItemToDialog(U_DIALOG_DM_DE, "[0] DM2 [Desert Eagle, Combat Shotgun]");
AddItemToDialog(U_DIALOG_DM_DE, "[0] DM3 [Sawnoff Shotgun, Uzi]");
AddItemToDialog(U_DIALOG_DM_DE, "[0] DM4 [Katana]");
AddItemToDialog(U_DIALOG_DM_DE, "[0] DM5 [Minigun]");
AddItemToDialog(U_DIALOG_DM_DE, "[0] PB [Country Rifle]");
AddItemToDialog(U_DIALOG_DM_DE, "[0] BF [M4, Uzi, Granaten, Combat Shotgun, Raketenwerfer]");
AddItemToDialog(U_DIALOG_DM_EN, "[0] DM1 [Sniper, Desert Eagle, Shotgun]");
AddItemToDialog(U_DIALOG_DM_EN, "[0] DM2 [Desert Eagle, Combat Shotgun]");
AddItemToDialog(U_DIALOG_DM_EN, "[0] DM3 [Sawnoff Shotgun, Uzi]");
AddItemToDialog(U_DIALOG_DM_EN, "[0] DM4 [Katana]");
AddItemToDialog(U_DIALOG_DM_EN, "[0] DM5 [Minigun]");
AddItemToDialog(U_DIALOG_DM_EN, "[0] PB [Country Rifle]");
AddItemToDialog(U_DIALOG_DM_EN, "[0] BF [M4, Uzi, Grenades, Combat Shotgun, Rocket Launcher]");
return 1;
}
new DM1_Counter;
COMMAND:dm1(playerid, params[])
{
new Random = random(sizeof(RandomSpawnsDM1)),
pName[MAX_PLAYER_NAME],
stringDE[128],
stringEN[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(stringDE, sizeof(stringDE), "»DEATHMATCH« {%06x}%s "#C_DM_E"hat das DM1 betreten! [/DM1]", GetPlayerColor(playerid) >>> 8, pName);
format(stringEN, sizeof(stringEN), "»DEATHMATCH« {%06x}%s "#C_DM_E"has joined DM1! [/DM1]", GetPlayerColor(playerid) >>> 8, pName);
AddToDM(playerid, stringDE, stringEN, RandomSpawnsDM1[Random][0], RandomSpawnsDM1[Random][1], RandomSpawnsDM1[Random][2], RandomSpawnsDM1[Random][3], DESERT_EAGLE, 5000, SHOTGUN, 5000, SNIPER_RIFLE, 5000, 0, 0, 1, 0);
DM1_Counter++;
format(olditem, 128, GetItemFromDialog(dialogid, U_DIALOG_DM_DE)); //Zeile 498
format(newitem, 128, "[%d] DM1 [Sniper, Desert Eagle, Combat Shotgun]", DM1_Counter); //Zeile 499
UpdateItemInDialog(U_DIALOG_DM_DE, olditem, newitem); //Zeile 500
format(olditem, 128, GetItemFromDialog(dialogid, U_DIALOG_DM_EN)); //Zeile 502
format(newitem, 128, "[%d] DM1 [Sniper, Desert Eagle, Combat Shotgun]", DM1_Counter); //Zeile 503
UpdateItemInDialog(U_DIALOG_DM_EN, olditem, newitem); //Zeile 504
return 1;
}
COMMAND:dm(playerid, params[])
{
if(pInfo[playerid][Language] == LANGUAGE_DE) ShowUpdateDialog(playerid, U_DIALOG_DM_DE, DIALOG_STYLE_LIST, "Deathmatches", GetDialogInfo(U_DIALOG_DM_DE), "Beitreten", "Schließen");
if(pInfo[playerid][Language] == LANGUAGE_EN) ShowUpdateDialog(playerid, U_DIALOG_DM_EN, DIALOG_STYLE_LIST, "Deathmatches", GetDialogInfo(U_DIALOG_DM_EN), "Join", "Close");
return 1;
}
D:\Documents\San Andreas Unleashed\pawno\include\Systems\Deathmatches.inc(498) : error 017: undefined symbol "olditem"
D:\Documents\San Andreas Unleashed\pawno\include\Systems\Deathmatches.inc(499) : error 017: undefined symbol "newitem"
D:\Documents\San Andreas Unleashed\pawno\include\Systems\Deathmatches.inc(500) : error 017: undefined symbol "olditem"
D:\Documents\San Andreas Unleashed\pawno\include\Systems\Deathmatches.inc(502) : error 017: undefined symbol "olditem"
D:\Documents\San Andreas Unleashed\pawno\include\Systems\Deathmatches.inc(503) : error 017: undefined symbol "newitem"
D:\Documents\San Andreas Unleashed\pawno\include\Systems\Deathmatches.inc(504) : error 017: undefined symbol "olditem"
____________________________________________________________________________________________________________________________________________________________________________________________________________________________
stock ShowUpdateDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
DialogOpened[playerid] = dialogid;
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]); //Zeile 1276
if(dialogid > -1 && dialogid < MAX_DIALOGS)
{
format(Caption[dialogid], sizeof(Caption[]), caption);
format(Info[dialogid], sizeof(Info[]), info);
format(Button1[dialogid], sizeof(Button1[]), button1);
format(Button2[dialogid], sizeof(Button2[]), button2);
}
return 1;
}
stock AddItemToDialog(dialogid, item[])
{
new ItemPosition = strfind(Info[dialogid], item);
if(ItemPosition != -1) strdel(Info[dialogid], ItemPosition, ItemPosition(item) + 1); //Zeile 1299
format(Info[dialogid], sizeof(Info[]), "%s%s\n", Info[dialogid], item);
return UpdateDialogForAll(dialogid);
}
D:\Documents\San Andreas Unleashed\gamemodes\brawl.pwn(1276) : error 029: invalid expression, assumed zero
D:\Documents\San Andreas Unleashed\gamemodes\brawl.pwn(1299) : error 012: invalid function call, not a valid address
D:\Documents\San Andreas Unleashed\gamemodes\brawl.pwn(1299) : warning 215: expression has no effect
D:\Documents\San Andreas Unleashed\gamemodes\brawl.pwn(1299) : error 001: expected token: ";", but found ")"
D:\Documents\San Andreas Unleashed\gamemodes\brawl.pwn(1299) : error 029: invalid expression, assumed zero
D:\Documents\San Andreas Unleashed\gamemodes\brawl.pwn(1299) : fatal error 107: too many error messages on one line