//CSSB // Reset our position counter //new pos = 0;
new szItemName[32], szItemName2[32], szItemName3[32], szCurrentItems[32];
// Get the item and race names LANG_GetItemName( g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE], idUser, szItemName, 31, true ); LANG_GetItemName( g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO], idUser, szItemName2, 31, true ); LANG_GetItemName( g_iShopMenuItems[iTargetID][ITEM_SLOT_THREE], idUser, szItemName3, 31, true );
new bool:ItemSlotOne = false; new bool:HasMoreThanOneRing = false;
if ( g_iTotalRings[iTargetID] > 1 ) HasMoreThanOneRing = true;
//CSSB // User has one item if ( g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE] > ITEM_NONE && g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE] != ITEM_MOLE ) { formatex(szCurrentItems, 31, "%L:",LANG_PLAYER,"WC3_CURRENT_ITEMS" ); /* // Then they have rings, lets print how many there are if ( HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE] == ITEM_RING ) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^nItem: %s x%d", szItemName, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^nItem: %s", szItemName ); */ // Then they have rings, lets print how many there are if ( HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE] == ITEM_RING ) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%s %s x%d", szCurrentItems, szItemName, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%s %s",szCurrentItems, szItemName );
ItemSlotOne = true; }
// User has another item if ( g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] > ITEM_NONE && g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] != ITEM_MOLE ) { // Then the string isn't empty and we have information in it (so we have a first item) if ( ItemSlotOne ) {
// Then they have rings, lets print how many there are if (HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] == ITEM_RING) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, " %L %s x%d", LANG_PLAYER, "WORD_AND", szItemName2, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, " %L %s", LANG_PLAYER, "WORD_AND", szItemName2 ); }
//CSSB // We don't need the word "and" else { formatex(szCurrentItems, 31, "%L:",LANG_PLAYER,"WC3_CURRENT_ITEMS" );
/* // Then they have rings, lets print how many there are if (HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] == ITEM_RING) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^nItem: %s x%d", szItemName2, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^nItem: %s", szItemName2 ); */
// Then they have rings, lets print how many there are if (HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] == ITEM_RING) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%s %s x%d", szCurrentItems, szItemName2, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%s %s", szCurrentItems, szItemName2 );
}
} if ( g_iShopMenuItems[iTargetID][ITEM_SLOT_THREE] > ITEM_NONE && g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] != ITEM_MOLE ) { // Then the string isn't empty and we have information in it (so we have a first item) if ( ItemSlotOne ) {
// Then they have rings, lets print how many there are if (HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_THREE] == ITEM_RING) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, " %L %s x%d", LANG_PLAYER, "WORD_AND", szItemName3, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, " %L %s", LANG_PLAYER, "WORD_AND", szItemName3 ); } }
// Add the Health + Armor to the message if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO ) { iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%L: %d^n%L: %d", LANG_PLAYER, "CURRENT_HEALTH", get_user_health( iTargetID ), LANG_PLAYER, "WORD_ARMOR", get_user_armor( iTargetID ) ); }
// Format the message new Float:fSpecTime = SPEC_HOLDTIME;
//CSSB // Reset our position counter //new pos = 0;
new szItemName[32], szItemName2[32],szCurrentItems[32];
// Get the item and race names LANG_GetItemName( g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE], idUser, szItemName, 31, true ); LANG_GetItemName( g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO], idUser, szItemName2, 31, true );
new bool:ItemSlotOne = false; new bool:HasMoreThanOneRing = false;
if ( g_iTotalRings[iTargetID] > 1 ) HasMoreThanOneRing = true;
//CSSB // User has one item if ( g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE] > ITEM_NONE && g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE] != ITEM_MOLE ) { formatex(szCurrentItems, 31, "%L:",LANG_PLAYER,"WC3_CURRENT_ITEMS" ); /* // Then they have rings, lets print how many there are if ( HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE] == ITEM_RING ) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^nItem: %s x%d", szItemName, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^nItem: %s", szItemName ); */ // Then they have rings, lets print how many there are if ( HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_ONE] == ITEM_RING ) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%s %s x%d",szCurrentItems, szItemName, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%s %s",szCurrentItems, szItemName );
ItemSlotOne = true; }
// User has another item if ( g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] > ITEM_NONE && g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] != ITEM_MOLE ) { // Then the string isn't empty and we have information in it (so we have a first item) if ( ItemSlotOne ) {
// Then they have rings, lets print how many there are if (HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] == ITEM_RING) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, " %L %s x%d", LANG_PLAYER, "WORD_AND", szItemName2, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, " %L %s", LANG_PLAYER, "WORD_AND", szItemName2 ); }
//CSSB // We don't need the word "and" else { formatex(szCurrentItems, 31, "%L:",LANG_PLAYER,"WC3_CURRENT_ITEMS" );
/* // Then they have rings, lets print how many there are if (HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] == ITEM_RING) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^nItem: %s x%d", szItemName2, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^nItem: %s", szItemName2 ); */
// Then they have rings, lets print how many there are if (HasMoreThanOneRing && g_iShopMenuItems[iTargetID][ITEM_SLOT_TWO] == ITEM_RING) iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%s %s x%d",szCurrentItems, szItemName2, g_iTotalRings[iTargetID] ); else iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%s %s",szCurrentItems, szItemName2 );
}
}
// Add the Health + Armor to the message if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO ) { iMsgPos += formatex( szMsg[iMsgPos], 512-iMsgPos, "^n%L: %d^n%L: %d", LANG_PLAYER, "CURRENT_HEALTH", get_user_health( iTargetID ), LANG_PLAYER, "WORD_ARMOR", get_user_armor( iTargetID ) ); }
// Format the message new Float:fSpecTime = SPEC_HOLDTIME;
Ихtианdр, shop3 это другой мод совсем,хотя есть всякие shop3 в виде плагинов,но это все "мусор" имхо. Тем более мне не понятно,почему ты спрашиваешь такие вопросы именно в эту тему.