take_OnDialogResponse( playerid, dialogid, response, listitem) { if(dialogid == 68) { if(!response) return 1; if(response) { AddItem( playerid, ItemInfo[ DeadList[ playerid ][ listitem ] ][ Item_Name ], DeadQntList[ playerid ][ listitem ] ); for( new items; items < MAX_ITEMS; items++) { new id = GetDeadID( playerid ); new itemid = PlayerDeadItemID[ items ][ id ]; if( PlayerDeadItemQnt[ items ][ DeadGet[ playerid ][ listitem ] ] != 0) { if(itemid == DeadList[ playerid ][ listitem ]) { PlayerDeadItemQnt[ listitem ][ DeadGet[ playerid ][ listitem ]] = 0; break; } } } } return 1; } return 0; }
new DeadGet[ MAX_PLAYERS ][ MAX_ITEMS ]; new DeadList[ MAX_PLAYERS ][ MAX_ITEMS ]; new DeadQntList[ MAX_PLAYERS ][ MAX_ITEMS ]; ShowLooting( playerid ) { new text[ 3000 ], subtxt[ 128 ], lootslot; for( new items; items < MAX_ITEMS; items++) { new id = GetDeadID( playerid ); new itemid = PlayerDeadItemID[ items ][ id ]; if( PlayerDeadItemQnt[ items ][ id ] > 0) { printf( "%d", items ); DeadGet[ playerid ][ lootslot ] = id; DeadList[ playerid ][ lootslot ] = itemid; DeadQntList[ playerid ][ lootslot ] = PlayerDeadItemQnt[ items ][ id ]; // -- format( subtxt, sizeof subtxt, "%d\t%s\n", PlayerDeadItemQnt[ items ][ id ], ItemInfo[ itemid ][ Item_Name ]); strcat( text, subtxt ); lootslot++; } } ShowPlayerDialog( playerid, 68, DIALOG_STYLE_LIST, "Quantia | Item ", text, "Pegar", "x"); return 1; }
break;
take_OnDialogResponse( playerid, dialogid, response, listitem)
{
if(dialogid == 68)
{
if(!response) return 1;
AddItem( playerid, ItemInfo[ DeadList[ playerid ][ listitem ] ][ Item_Name ], DeadQntList[ playerid ][ listitem ] );
for( new items; items < MAX_ITEMS; items++)
{
new id = GetDeadID( playerid );
new itemid = PlayerDeadItemID[ items ][ id ];
if( PlayerDeadItemQnt[ items ][ DeadGet[ playerid ][ listitem ] ] != 0)
{
if(itemid == DeadList[ playerid ][ listitem ])
{
PlayerDeadItemQnt[ listitem ][ DeadGet[ playerid ][ listitem ]] = 0;
}
}
}
}
return 0;
}
Se nгo for nessa parte, nгo sei
PHP код:
|
new DeadGet[ MAX_PLAYERS ][ MAX_ITEMS ];
new DeadList[ MAX_PLAYERS ][ MAX_ITEMS ];
new DeadQntList[ MAX_PLAYERS ][ MAX_ITEMS ];
ShowLooting( playerid )
{
new subtxt[ 128 ], lootslot;
for( new items; items < MAX_ITEMS; items++)
{
new id = GetDeadID( playerid );
new itemid = PlayerDeadItemID[ items ][ id ];
if( PlayerDeadItemQnt[ items ][ id ] > 0)
{
printf( "%d", items );
DeadGet[ playerid ][ lootslot ] = id;
DeadList[ playerid ][ lootslot ] = itemid;
DeadQntList[ playerid ][ lootslot ] = PlayerDeadItemQnt[ items ][ id ];
format( subtxt, sizeof( subtxt ), "%d\t%s\n", PlayerDeadItemQnt[ items ][ id ], ItemInfo[ itemid ][ Item_Name ]);
ShowPlayerDialog( playerid, 68, DIALOG_STYLE_LIST, "Quantia | Item ", subtxt, "Pegar", "x");
lootslot++;
}
}
return 1;
}
PHP код:
|