02.02.2014, 20:51
That's thanks to -v flag (default pawno setting is -v0 (shows only when nearing stack/heap clash), starting with -v1 you'll get that information always)
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_DM_EDIT:
{
if(!response)
return DeletePVar(playerid, "DMSelect");
new
dmid = GetPVarInt(playerid, "DMSelect"); // Declare dmid variable
switch(listitem)
{
case 0: // Csatlakozбs
{
g_pDeathMatchID[playerid] = dmid;
SendClientMessagef(playerid, COLOR_YELLOW, "Csatlakoztбl a {" #XCOLOR_PINK "}%s nevű DM-hez. {" #XCOLOR_DEFAULT "}(id: %d)", country, dmid);
UpdateDMSpawn(playerid);
SpawnPlayer(playerid);
}
case 1: // Informбciуk megtekintйse
{
}
case 2: // Nйv megvбltoztatбsa
{
format(i_str, 64, "{" #XCOLOR_BLUE "}%s -> Nйv vбltбs", g_szDMName[dmid]);
ShowPlayerDialog(playerid, DIALOG_DM_EDIT_NAME, DIALOG_STYLE_INPUT, i_str, "Нrd be lentre a DM ъj nevйt.", "Okй", "Vissza");
SetPVarInt(playerid, "EditName", 1);
}
case 3: // Gyorsparancs megvбltoztatбsa
{
format(i_str, 64, "{" #XCOLOR_BLUE2 "}%s -> Parancs beбllнtбsa", g_szDMName[dmid]);
ShowPlayerDialog(playerid, DIALOG_DM_EDIT_NAME, DIALOG_STYLE_INPUT, i_str, "Нrd be lentre a DM-hez tartozу parancsot\n\nHa tцrцlni akarod, akkor ne нrj be semmit.", "Okй", "Vissza");
SetPVarInt(playerid, "EditName", 2);
}
case 4: // Fegyverek szerkesztйse
{
}
case 5, 6, 7, 8: // Tнpus, Clearworld, Headshot, Weapon Buy
{
static const
E_DM_FLAGS:aWhat[] = {e_IS_TDM, e_IN_CLEARWORLD, e_HEADSHOT, e_WEAPONS_BUY},
szState[][] = {"{" #XCOLOR_RED "}Nem", "{" #XCOLOR_GOLD "}Igen"};
new
id = listitem - 5,
i;
// : ig tцrцljьk a stringet majd a vйgйn elhelyezzьk az engedйlyez-ve vagy a tiltva rйzletet
while(inputtext[i])
{
if(inputtext[i] == ':')
{
inputtext[i] = ' ';
inputtext[i + 1] = EOS;
break;
}
i++;
}
strcpy(i_str, inputtext); // inputtext -> i_str-be mбsolбsa
printf("after shit: %s, %d", inputtext, id);
g_DMFlags[dmid] ^= aWhat[id];
new
flag = ((g_DMFlags[dmid] & aWhat[id]) != E_DM_FLAGS:0);
strcat(i_str, "{" #XCOLOR_GREEN3 "}megvбltoztatva - ");
switch(id)
{
case 0: strcat(i_str, (flag) ? ("TDM") : ("DM"));
default: strcat(i_str, szState[flag]);
}
SendClientMessage(playerid, COLOR_BLUE, i_str);
ShowDMEditDialog(playerid, dmid);
}
}
//DeletePVar(playerid, "DMSelect");
return 1;
}
case DIALOG_DM_EDIT_NAME:
{
new
dmid = GetPVarInt(playerid, "DMSelect"); // (746) : error 021: symbol already defined: "dmid" - WTFFF????
if(!response) goto Ide;
// Code..
}
}
}
//////////////
// Check these in the code, these are good placed. This SHOULD work, because I used same method in my clan system with "clanid" and I never get any errors. This is very annoying bug.
new
dmid = GetPVarInt(playerid, "DMSelect"); // Declare dmid variable
new
dmid = GetPVarInt(playerid, "DMSelect"); // (746) : error 021: symbol already defined: "dmid"
Codes are right but compiler is false.
24376 Код:
if(!PlayerData[playerid][pOdunculuk]) Код:
if(Agaclar[id][agacHasar] > 0) Код:
if(Car_IsOwner(playerid, id) && (GetFactionType(playerid) == FACTION_POLICE || GetFactionType(playerid) == FACTION_GOV)) |
switch (YHash(string))
{
case _H<hello>: {}
case _H<world>: {}
}